CVE-2026-7568·PHP vulnerability
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, and 8.5.* before 8.5.6, the metaphone() function in ext/standard/metaphone.c uses a signed int variable to track the current position within the input string. If a string longer than 2,147,483,647 bytes is passed, a signed integer overflow occurs, resulting in undefined behavior. This can lead to an out-of-bounds read, causing a segmentation fault or access to unrelated memory, and may affect the availability of the PHP process.
- Severity
- high
- Software
- PHP
- Fixed in
- 8.5.6
- Published
- 2026-05-10
Affected versions
From: 8.5.0
Until: 8.5.6
Fixed in: 8.5.6
How to fix this CVE
Update PHP to version 8.5.6 or later to fix a signed integer overflow vulnerability in the metaphone() function that can cause denial of service. Organizations running PHP 8.5.0 through 8.5.5 should prioritize this patch to prevent potential segmentation faults and service disruptions.
sudo dnf update phpDefensia detects this vulnerability
How to check if you are affected
- Step 1: Run `php -v` to check your current PHP version and confirm if it falls within 8.5.0-8.5.5.
- Step 2: Identify if your application uses the metaphone() function by running `grep -r "metaphone" /path/to/your/app --include="*.php"`.
- Step 3: Search your web server error logs for segmentation faults: `grep -i "segmentation fault\|signal 11" /var/log/php-fpm.log /var/log/apache2/error.log /var/log/nginx/error.log`.
- Step 4: After patching, confirm the update with `php -v` and verify the version is 8.5.6 or newer.
FAQ
What is CVE-2026-7568?
CVE-2026-7568 is a signed integer overflow vulnerability in PHP's metaphone() function that occurs when processing extremely large strings (over 2GB), leading to out-of-bounds memory access and potential denial of service.
Is CVE-2026-7568 being actively exploited?
No, this vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available, though the risk should not be underestimated for applications processing user-supplied phonetic data.
What versions of PHP are affected by CVE-2026-7568?
PHP 8.5.0 through 8.5.5 are vulnerable. Earlier branches (8.2, 8.3, 8.4) have patched versions available (8.2.31, 8.3.31, 8.4.21 respectively).
How do I check if my server is vulnerable to CVE-2026-7568?
Run `php -v` and if the output shows version 8.5.0 to 8.5.5, your system is vulnerable. Additionally, check if metaphone() is used in your codebase with `grep -r 'metaphone' /path/to/application`.
Does Defensia detect CVE-2026-7568?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2026-7568 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-2026-7568. Free for 1 server.
Get started free