Vendors › PHP
CVE-2025-14178
Medium (6.5) EPSS 0.6% PHP · core
Heap buffer overflow in array_merge()
The following PHP code triggers a reliable heap buffer overflow: php $arr = range(0, 2**29); array_merge($arr, $arr, $arr, $arr, $arr, $arr, $arr, $arr); Or the general case: php $power = 24; // You can choose this number 1 <= $power < 32 $arr = range(0, 2**$power); array_merge(...array_fill(0, 2**(32-$power), $arr)); This is because packed arrays in array_merge() have an optimization that requires precomputing the count of the elements, done using count += zend_hash_num_elements(Z_ARRVAL_P(arg));. However, this may overflow.
| Published | 2025-12-18 |
| Updated | 2025-12-19 |
| Affected | PHP versions < 8.1.34; PHP versions < 8.2.30; PHP versions < 8.3.29; PHP versions < 8.4.16; PHP versions < 8.5.1 |
| Fix | Upgrade to 8.1.34, 8.2.30, 8.3.29, 8.4.16, 8.5.1 (first fixed release per supported branch). |
| Vendor advisory | https://github.com/php/php-src/security/advisories/GHSA-h96m-rvf9-jgm2 |
CVEs (1)
| CVE | CWE | Type | Impact | Links |
|---|---|---|---|---|
| CVE-2025-14178 | CWE-190;CWE-787 | Overflow | Code Execution | NVD · CVE.org · EUVD |
CWE, type and impact come from the NVD enrichment pass; unfilled rows are pending enrichment.
Same CVE in other advisories
- RHSA-2026:7614 — Red Hat · High (7.5) · 2026-04-10
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update - RHSA-2026:4507 — Red Hat · Medium (6.5) · 2026-03-12
Red Hat Security Advisory: php:7.4 security update - RHSA-2026:4514 — Red Hat · Medium (6.5) · 2026-03-12
Red Hat Security Advisory: php:7.4 security update - RHSA-2026:4517 — Red Hat · Medium (6.5) · 2026-03-12
Red Hat Security Advisory: php:7.4 security update - RHSA-2026:4266 — Red Hat · Medium (6.5) · 2026-03-11
Red Hat Security Advisory: php security update - RHSA-2026:4212 — Red Hat · Medium (6.5) · 2026-03-10
Red Hat Security Advisory: php security update - RHSA-2026:4077 — Red Hat · Medium (6.5) · 2026-03-09
Red Hat Security Advisory: php security update - RHSA-2026:4086 — Red Hat · Medium (6.5) · 2026-03-09
Red Hat Security Advisory: php security update - RHSA-2026:2799 — Red Hat · Medium (6.5) · 2026-02-17
Red Hat Security Advisory: php security update - RHSA-2026:2470 — Red Hat · Medium (6.5) · 2026-02-10
Red Hat Security Advisory: php:7.4 security update - RHSA-2026:1628 — Red Hat · High (7.5) · 2026-02-02
Red Hat Security Advisory: php security update - RHSA-2026:1409 — Red Hat · High (7.5) · 2026-01-27
Red Hat Security Advisory: php:8.2 security update - RHSA-2026:1412 — Red Hat · High (7.5) · 2026-01-27
Red Hat Security Advisory: php:8.2 security update - RHSA-2026:1429 — Red Hat · High (7.5) · 2026-01-27
Red Hat Security Advisory: php:8.3 security update - RHSA-2026:1169 — Red Hat · High (7.5) · 2026-01-26
Red Hat Security Advisory: php:8.2 security update - RHSA-2026:1185 — Red Hat · High (7.5) · 2026-01-26
Red Hat Security Advisory: php security update - RHSA-2026:1187 — Red Hat · High (7.5) · 2026-01-26
Red Hat Security Advisory: php:8.2 security update - RHSA-2026:1190 — Red Hat · High (7.5) · 2026-01-26
Red Hat Security Advisory: php:8.3 security update
Open in the CVEMesh app Create a free account
Track this advisory against your own stack — add your assets and CVEMesh shows which advisories actually apply to the versions you run.
CVEMesh aggregates public vendor advisories as guidance; always verify against the vendor's official advisory before patching or upgrading.