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

Medium 6.5 Published Updated

An integer overflow in PHP's array_merge function can cause heap buffer overflows, leading to crashes or potential code execution on affected servers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-14178?

CVE-2025-14178 is a medium-severity vulnerability in Php Php, published on 27 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-787, CWE-190

Which versions are affected by CVE-2025-14178?

3 open source packages ship an affected version, including libphp, php and php-min. It affects 1 product.

PackageAffectedFixed in
libphp BitnamiAll versions8.1.34, 8.2.30, 8.3.29, 8.4.16, 8.5.1
php BitnamiAll versions8.1.34, 8.2.30, 8.3.29, 8.4.16, 8.5.1
php-min BitnamiAll versions8.1.34, 8.2.30, 8.3.29, 8.4.16, 8.5.1
Linux distribution packages (37)
apcu-panel Red Hat:rhel_aus:8.4::appstreamAll versions0:5.1.18-1.module+el8.3.0+6678+b09f589e
libzip Red Hat:rhel_aus:8.4::appstreamAll versions0:1.6.1-1.module+el8.3.0+6678+b09f589e
libzip-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:1.6.1-1.module+el8.3.0+6678+b09f589e
libzip-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:1.6.1-1.module+el8.3.0+6678+b09f589e
libzip-devel Red Hat:rhel_aus:8.4::appstreamAll versions0:1.6.1-1.module+el8.3.0+6678+b09f589e
libzip-tools Red Hat:rhel_aus:8.4::appstreamAll versions0:1.6.1-1.module+el8.3.0+6678+b09f589e
libzip-tools-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:1.6.1-1.module+el8.3.0+6678+b09f589e
php Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-bcmath Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-bcmath-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-cli Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-cli-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-common Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-common-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-dba Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-dba-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-dbg Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-dbg-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-devel Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-embedded Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-embedded-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-enchant Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-enchant-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-ffi Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-ffi-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-fpm Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-fpm-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-gd Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-gd-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-gmp Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-gmp-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-intl Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-intl-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-json Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2
php-json-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:7.4.6-5.module+el8.4.0+24050+df93a449.2

Products include Php Php.

How do I fix CVE-2025-14178?

Upgrade libphp to a fixed version for your release line: 8.1.34, 8.2.30, 8.3.29 or 8.4.16.

Is CVE-2025-14178 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-14178 exists.

All Php Php vulnerabilities

Sources

Also known as AZL-73198, AZL-73237, BELL-CVE-2025-14178, BIT-libphp-2025-14178, BIT-php-2025-14178, BIT-php-min-2025-14178 and 27 more.

Is CVE-2025-14178 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free