{"id":"CVE-2025-14178","title":"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…","summary":"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…","severity":"medium","cvss":6.5,"cvssVector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","cwe":["CWE-190","CWE-787","CWE-190"],"vendor":"php","product":"php","affected":["php >= 8.1.0, < 8.1.34","php >= 8.2.0, < 8.2.30","php >= 8.3.0, < 8.3.29","php >= 8.4.0, < 8.4.16","php >= 8.5.0, < 8.5.1"],"patched":["php 8.5.1"],"published":"2025-12-27","updated":"2026-10-13","sourceUpdated":"2026-10-13T09:10:00.323","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-14178","references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-h96m-rvf9-jgm2","label":"security@php.net"},{"url":"https://lists.debian.org/debian-lts-announce/2026/01/msg00019.html","label":"af854a3a-2127-422b-91ae-364da2661108"}],"tags":["nvd"],"epss":0.00459,"epssPercentile":0.37909,"ingestedAt":"2026-10-13T09:20:23.161Z","slug":"CVE-2025-14178","body":"## Overview\n\nIn 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.\n\n## Affected\n\n- `php >= 8.1.0, < 8.1.34`\n- `php >= 8.2.0, < 8.2.30`\n- `php >= 8.3.0, < 8.3.29`\n- `php >= 8.4.0, < 8.4.16`\n- `php >= 8.5.0, < 8.5.1`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `php 8.5.1`","depth":"sunlit","depthScore":36,"depthScoreParts":{"impact":35.8,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}