CVE-2026-7259·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, a mismatch between encoding lists in Oniguruma and mbfl leads to a NULL pointer dereference, resulting in a segmentation fault and denial of service. The vulnerability is exploitable when user-controlled input can influence the encoding passed to mb_regex_encoding().
- Severity
- medium
- 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 resolve a NULL pointer dereference vulnerability in the multibyte string regex functions. This vulnerability can cause application crashes when processing specially crafted input through mb_regex_encoding(). Apply the security patch immediately to restore service stability and prevent denial-of-service conditions.
sudo dnf update phpDefensia detects this vulnerability
How to check if you are affected
- Check installed PHP version: php -v | grep 'PHP 8'
- Verify if mb_regex_encoding() is used in your application: grep -r 'mb_regex_encoding' /var/www/html
- Search application logs for segmentation faults: grep -i 'segmentation fault\|segfault\|signal 11' /var/log/apache2/error.log /var/log/nginx/error.log /var/log/php-fpm.log
- Confirm patch installation: php -v should show 8.5.6 or later
FAQ
What is CVE-2026-7259?
CVE-2026-7259 is a denial-of-service vulnerability in PHP's multibyte regex functions caused by an encoding mismatch between the Oniguruma and mbfl libraries. When user input controls the encoding parameter in mb_regex_encoding(), a NULL pointer dereference triggers a segmentation fault and crashes the PHP process.
Is CVE-2026-7259 being actively exploited?
No, CVE-2026-7259 is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, the attack surface is low-complexity and requires only network access, making proactive patching essential.
What versions of PHP are affected by CVE-2026-7259?
PHP 8.2.0 through 8.2.30, 8.3.0 through 8.3.30, 8.4.0 through 8.4.20, and 8.5.0 through 8.5.5 are affected. PHP 8.5.6 and later versions include the fix.
How do I check if my server is vulnerable to CVE-2026-7259?
Run php -v and compare your version against the affected ranges. If you are on 8.5.x and the version is below 8.5.6, your server is vulnerable.
Does Defensia detect CVE-2026-7259?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2026-7259 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-7259. Free for 1 server.
Get started free