CVE-2025-14178: Heap buffer overflow in array_merge()

Published Dec 18, 2025
·
Updated

Fixed (Heap buffer overflow in arraymerge()). (CVE-2025-14178)

Other sources

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 arraymerge() when the total element count of packed arrays exceeds 32-bit limits or HTMAXSIZE, due to an integer overflow in the precomputation of element counts using zendhashnumelements(). This may lead to memory corruption or crashes and affect the integrity and availability of the target server.

— NVD

Affected Software

9 affected componentsFixes available
PHP PHP<8.1.34
8.1.34
Microsoft azl3 php 8.3.23-1
Microsoft cbl2 php 8.1.33-1
PHP PHP>=8.1.0<8.1.34
PHP PHP>=8.2.0<8.2.30
PHP PHP>=8.3.0<8.3.29
PHP PHP>=8.4.0<8.4.16
PHP PHP>=8.5.0<8.5.1
Microsoft azl3 php 8.3.29-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.1.34
  2. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.1.34
  3. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.2.30
  4. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.3.29
  5. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.4.16
  6. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.5.1

Event History

Dec 18, 2025
CVE Published
via PHP·12:00 AM
Data Sourced
via PHP·12:00 AM
DescriptionAffected Software
Dec 27, 2025
CVE Published
via MITRE·07:27 PM
Data Sourced
via MITRE·07:27 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·08:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeaknessAffected Software
Dec 29, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-14178?

CVE-2025-14178 has a high severity due to the potential for a heap buffer overflow.

2

How do I fix CVE-2025-14178?

To fix CVE-2025-14178, upgrade to PHP version 8.1.34 or later.

3

What issue does CVE-2025-14178 address?

CVE-2025-14178 addresses a heap buffer overflow vulnerability in the array_merge() function.

4

Which versions of PHP are affected by CVE-2025-14178?

CVE-2025-14178 affects PHP versions prior to 8.1.34.

5

Is there a patch available for CVE-2025-14178?

Yes, the patch for CVE-2025-14178 is included in PHP version 8.1.34.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203