CVE-2026-7258

Out-of-bounds read in urldecode() on NetBSD

Published May 10, 2026 CVSS 4.0 · 6.3 Medium 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, some functions, including urldecode(), pass signed char to ctype functions (like isxdigit()). On the systems with default signed char and optimized table-lookup ctype functions - such as NetBSD - this can lead to accessing array with negative offset, which can trigger a denial of service.

Analysis

AI-generated

Technical impact

PHP functions such as urldecode() pass signed characters to ctype routines like isxdigit, which on platforms that use a signed char default together with an optimized table‑lookup implementation of ctype can trigger an array access with a negative offset. This out‑of‑bounds read, identified as CWE‑125 and CWE‑839, may cause the PHP interpreter to crash or otherwise become unavailable, resulting in a denial of service for applications that invoke the vulnerable routines with untrusted input.

Affected Systems

The flaw exists in PHP 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. Systems running NetBSD, which employ a signed char default and use optimized ctype table lookups, are explicitly susceptible, but other platforms with similar default settings and ctype implementations may also be affected. Any deployment of PHP in these version ranges on such operating systems is at risk.

Risk and Exploitability

The CVSS score of 6.3 reflects a moderate severity associated primarily with availability loss. An EPSS score of less than 1% indicates a very low probability of exploitation, and the vulnerability is not listed in CISA’s KEV catalog, suggesting no known widespread attacks. An attacker would need to supply malformed URL data that is processed by PHP; this can be accomplished remotely if the PHP instance receives untrusted input from a web application, or locally if privileged code can execute the vulnerable function. The exploit path is straightforward once the vulnerable PHP version is in use, and the impact is a forced termination of the PHP process, which restores availability after service restart.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PHP to 8.2.31, 8.3.31, 8.4.21, 8.5.6 or newer, where the signed‑char handling bug has been fixed
  • On NetBSD or similar systems, rebuild PHP compiled with an unsigned‑char flag or disable optimized ctype table lookups to avoid negative offsets
  • Ensure application logic validates or sanitizes URL‑decoded input and avoids calling urldecode on untrusted data until a patch is applied

Generated by OpenCVE AI on May 16, 2026 at 02:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4586-1 php7.4 security update
Debian DSA Debian DSA DSA-6255-1 php8.2 security update
Debian DSA Debian DSA DSA-6256-1 php8.4 security update
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': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/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, some functions, including urldecode(), pass signed char to ctype functions (like isxdigit()). On the systems with default signed char and optimized table-lookup ctype functions - such as NetBSD - this can lead to accessing array with negative offset, which can trigger a denial of service.
Title Out-of-bounds read in urldecode() on NetBSD
Weaknesses CWE-125
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-125

    Out-of-bounds Read

  • CWE-839

    Numeric Range Comparison Without Minimum Check

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
May 11, 2026, 1:06 PM
Reserved
Apr 28, 2026, 4:58 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:28 AM