Skip to main content
Public proof of conceptFix available

CVE-2025-14178

A public proof of concept exists; no exploitation attested.

  • Published2025-12-27
  • Fixed in8.5.1 · 8.4.16 · 8.3.29 · 8.2.30 · 8.1.34
  • WeaknessCWE-190 · CWE-787

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2025-12-2720:15CVE publishedNVD

Versions per branch

NVD · OSV
PHP
BranchAffectedFixed in
8.5≥ 8.5.0, < 8.5.18.5.1
8.4≥ 8.4.0, < 8.4.168.4.16
8.3≥ 8.3.0, < 8.3.298.3.29
8.2≥ 8.2.0, < 8.2.308.2.30
8.1≥ 8.1.0, < 8.1.348.1.34
8.1< 8.1.348.1.34

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As php, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHP Group PHPother versions: affected

    package php

    Affected
    • ≥ 8.1.*, < 8.1.34fixed in 8.1.34semver
    • ≥ 8.2.*, < 8.2.30fixed in 8.2.30semver
    • ≥ 8.3.*, < 8.3.29fixed in 8.3.29semver
    • ≥ 8.4.*, < 8.4.16fixed in 8.4.16semver
    • ≥ 8.5.*, < 8.5.1fixed in 8.5.1semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2025-12-27

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.10.0+1596+477f03f8
  • libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.10.0+1605+02e07af7
  • libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.10.0+1911+f499711e
  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.10.0+1912+72767185
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.10.0+3935+28808425and 2 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+2750+78feabcband 1 other package
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+3239+bedf0508and 2 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.7.3-1.module_el8.10.0+3796+30ed3ef7and 2 other packages

109 more package ranges on OSV.dev

Vendor advisories

  • CVE-2025-14178 Red Hat Product Security4,232 products fixed

    php: heap-based buffer overflow in array_merge()

  • RHSA-2026:7614 Red Hat Product Security57 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

  • RHSA-2026:4517 Red Hat Product Security465 products fixed

    Red Hat Security Advisory: php:7.4 security update

  • RHSA-2026:4514 Red Hat Product Security237 products fixed

    Red Hat Security Advisory: php:7.4 security update

  • RHSA-2026:4507 Red Hat Product Security164 products fixed

    Red Hat Security Advisory: php:7.4 security update

  • RHSA-2026:4266 Red Hat Product Security201 products fixed

    Red Hat Security Advisory: php security update

13 more advisories

Full record on NVD

Fix

  1. Update PHP to 8.5.1 · 8.4.16 · 8.3.29 · 8.2.30 · 8.1.34
  2. Vendor fix Red Hat Product Security RHSA-2026:7614 · 57 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://images.redhat.com/
  3. Vendor fix Red Hat Product Security RHSA-2026:4517 · 465 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  4. Workaround from the vendor Red Hat Product Security RHSA-2026:7614 · 57 productsMitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-12-29
  • CNACVSS 3.16.5known since 2026-10-23
  • NVDCVSS 3.18.2read 2026-10-23
  • CNAweakness (CWE)CWE-190, CWE-787known since 2026-10-23
  • NVDweakness (CWE)CWE-190read 2026-10-23
  • FIRST EPSSEPSS score0.5 %2026-11-16
  • OSVaffected packages—
  • GitHub Advisoriesadvisory—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Published
2025-12-27
Last Modified
2026-10-13
NVD status
Modified
GitHub Advisory
GHSA-h96m-rvf9-jgm2

Frequently asked questions

What is CVE-2025-14178?

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.

Is CVE-2025-14178 actively exploited?

A proof-of-concept exploit exists for CVE-2025-14178, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2025-14178?

CVE-2025-14178 has a CVSS v3 base score of 8.2 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record