CVE-2024-8932·PHP vulnerability
In PHP versions 8.1.* before 8.1.31, 8.2.* before 8.2.26, 8.3.* before 8.3.14, uncontrolled long string inputs to ldap_escape() function on 32-bit systems can cause an integer overflow, resulting in an out-of-bounds write.
- Severity
- critical
- Software
- PHP
- Fixed in
- 8.3.14
- Published
- 2024-11-22
Affected versions
From: 8.3.0
Until: 8.3.14
Fixed in: 8.3.14
How to fix this CVE
PHP versions 8.3.0 through 8.3.13 contain a critical memory safety flaw in the ldap_escape() function that can be triggered by specially crafted long string inputs on 32-bit systems, leading to buffer overflow and potential code execution. Immediately upgrade to PHP 8.3.14 or later to patch this vulnerability. If you are running PHP 8.1 or 8.2, also verify you are on 8.1.31+ or 8.2.26+ respectively.
sudo dnf update phpDefensia detects this vulnerability
How to check if you are affected
- Check installed PHP version: run `php -v` and confirm it is 8.3.14 or later, or 8.2.26+, or 8.1.31+
- Verify if ldap_escape() is used in your application: grep -r 'ldap_escape' /var/www/ or search your codebase for this function call
- Check PHP error logs for segmentation faults or memory corruption errors: `tail -f /var/log/php-fpm.log | grep -i 'segfault\|overflow\|memory'`
- Confirm the patch by running `php -m | grep ldap` to ensure the LDAP extension is loaded, then test with: `php -r "echo ldap_escape('test', '', LDAP_ESCAPE_FILTER) . PHP_EOL;"`
FAQ
What is CVE-2024-8932?
CVE-2024-8932 is a critical integer overflow vulnerability in PHP's ldap_escape() function that occurs when processing excessively long string inputs on 32-bit systems, resulting in out-of-bounds memory writes and potential arbitrary code execution.
Is CVE-2024-8932 being actively exploited?
No, CVE-2024-8932 is not currently listed in the CISA Known Exploited Vulnerabilities catalog, and no public exploits have been disclosed as of the advisory date.
What versions of PHP are affected by CVE-2024-8932?
PHP 8.1.0–8.1.30, PHP 8.2.0–8.2.25, and PHP 8.3.0–8.3.13 are vulnerable. The fixes are available in PHP 8.1.31, 8.2.26, and 8.3.14 respectively.
How do I check if my server is vulnerable to CVE-2024-8932?
Run `php -v` to retrieve your PHP version. If it is 8.3.13 or earlier (or 8.2.25 or earlier, or 8.1.30 or earlier), your server is vulnerable and requires immediate patching.
Does Defensia detect CVE-2024-8932?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2024-8932 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-8932. Free for 1 server.
Get started free