Heap buffer overflow in array_merge()
Summary
| CVE | CVE-2025-14178 |
|---|---|
| State | PUBLISHED |
| Assigner | php |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2025-12-27 20:15:40 UTC |
| Updated | 2026-10-13 09:10:00 UTC |
| Description | In PHP versions:8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1, a heap buffer overflow occurs in array_merge() when the total element count of packed arrays exceeds 32-bit limits or HT_MAX_SIZE, due to an integer overflow in the precomputation of element counts using zend_hash_num_elements(). This may lead to memory corruption or crashes and affect the integrity and availability of the target server. |
Risk And Classification
Primary CVSS: v3.1 8.2 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Problem Types: CWE-190 | CWE-787 | CWE-787 CWE-787 Out-of-bounds Write | CWE-190 CWE-190 Integer Overflow or Wraparound
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 8.2 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H |
| 3.1 | [email protected] | Secondary | 6.5 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H |
| 3.1 | CNA | CVSS | 6.5 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
LowAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | PHP Group | PHP | affected 8.1.* 8.1.34 semver | Not specified |
| CNA | PHP Group | PHP | affected 8.2.* 8.2.30 semver | Not specified |
| CNA | PHP Group | PHP | affected 8.3.* 8.3.29 semver | Not specified |
| CNA | PHP Group | PHP | affected 8.4.* 8.4.16 semver | Not specified |
| CNA | PHP Group | PHP | affected 8.5.* 8.5.1 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| lists.debian.org/debian-lts-announce/2026/01/msg00019.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | |
| github.com/php/php-src/security/advisories/GHSA-h96m-rvf9-jgm2 | [email protected] | github.com | Vendor Advisory |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Niels Dossche (en)
There are currently no legacy QID mappings associated with this CVE.