CVE-2026-7259: PHP mbstring NULL pointer dereference in mb_regex_encoding

CVE-2026-7259 · Severity: medium · CVSS 6.5 · Published 2026-05-10

A vulnerability in PHP's multibyte string handling can allow an attacker to crash a web server or application. By providing a specific, unsupported text encoding name to certain PHP functions, an attacker can trigger a system crash (segmentation fault). This results in a denial of service, potentially taking websites or services offline.

Technologies: PHP Group PHP. Vendors: PHP Group.

Quick answers

Is CVE-2026-7259 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-7259 being exploited in the wild.
How severe is CVE-2026-7259?
Medium severity, with a CVSS score of 6.5, published 10 May 2026.
Which products and versions are affected?
PHP Group PHP 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, 8.5.* before 8.5.6, 8.2.0 to 8.2.30, 8.3.0 to 8.3.30, 8.4.0 to 8.4.20, 8.5.0 to 8.5.5.
Is there a fix for CVE-2026-7259?
A patch was published on 2026-05-10: Patched versions released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-7259 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-7259?
Check whether you run PHP Group PHP at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A mismatch exists between the encoding lists supported by the Oniguruma regex library and the internal mbfl library within PHP's mbstring extension. When mb_regex_encoding() is called with an encoding supported by Oniguruma but not by mbfl (such as 'iso-8859-11'), the internal mbfl encoding pointer is set to NULL. Subsequent calls to mbregex search APIs, such as mb_ereg_search_init(), result in a NULL pointer dereference in php_mb_check_encoding(). This leads to a segmentation fault and process crash. The issue is fixed in PHP versions 8.2.31, 8.3.31, 8.4.21, and 8.5.6.

Affected products

  • PHP Group PHP 8.2.0 to 8.2.30, 8.3.0 to 8.3.30, 8.4.0 to 8.4.20, 8.5.0 to 8.5.5

Timeline

  • 2026-05-07: advisory: GitHub Security Advisory published by PHP Group
  • 2026-05-10: disclosed: CVE published to NVD
  • 2026-05-10: patched: Patched versions released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.