CVE-2026-7259

Null pointer dereference in php_mb_check_encoding() via mb_ereg_search_init()

Published May 10, 2026 CVSS 4.0 · 2.1 Low EPSS < 1% KEV · Not listed
Description
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().

Analysis

AI-generated

Technical impact

A mismatch between encoding lists in Oniguruma and mbfl causes a NULL pointer dereference that leads to a segmentation fault, causing the PHP process to crash and resulting in a denial of service due to resource exhaustion or unavailability. The weakness is identified as a null pointer dereference (CWE‑476).

Affected Systems

The vulnerability affects PHP releases 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 from the PHP Group. Any web application running one of these affected PHP versions is potentially impacted.

Risk and Exploitability

The CVSS score of 2.1 classifies the severity as low; however, the exploit requires that an attacker can influence the encoding parameter passed to mb_regex_encoding(), which typically occurs when user input reaches this function. The EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, suggesting that widespread exploitation is not currently documented. Despite the low score, an attacker who can inject controlled data into the encoding argument can trigger a fatal crash of the PHP interpreter, leading to denial of service for the affected web service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update PHP to 8.2.31 or later, 8.3.31 or later, 8.4.21 or later, or 8.5.6 or later to include the fix.
  • Avoid passing user‑controlled values directly to mb_regex_encoding(); validate or sanitize encoding names before use.
  • If an immediate update is not possible, monitor for service restarts or shortages and consider using temporary isolation of affected services until the patch is applied.

Generated by OpenCVE AI on May 10, 2026 at 05:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6255-1 php8.2 security update
Debian DSA Debian DSA DSA-6256-1 php8.4 security update
Ubuntu USN Ubuntu USN USN-8336-1 PHP vulnerabilities
History
Type Values Removed Values Added
First Time appeared Php
Php php
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
Vendors & Products Php
Php php
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Php Group
Php Group php
Vendors & Products Php Group
Php Group php
Type Values Removed Values Added
Description 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().
Title Null pointer dereference in php_mb_check_encoding() via mb_ereg_search_init()
Weaknesses CWE-476
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L/AU:Y/U:Amber'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
May 11, 2026, 1:13 PM
Reserved
Apr 28, 2026, 5:07 AM
Status
Analyzed
Published
May 10, 2026, 5:16 AM
Modified
Jul 24, 2026, 8:10 AM
Severity
Moderate
Public date
May 10, 2026, 4:13 AM