Skip to main content

PHP CVE-2026-6104

| EUVDEUVD-2026-28979 MEDIUM
Out-of-bounds Read (CWE-125)
2026-05-10 php
Medium
Disputed · 6.3 Vendor: php
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft HTTP request with NUL-byte encoding parameter
  2. Delivery
    Transmit to vulnerable PHP application
  3. Exploit
    Application invokes mb_convert_encoding() or related mbstring function
  4. Execution
    Vulnerable strncasecmp() misinterprets string length
  5. Persist
    Out-of-bounds memory read triggered
  6. Impact
    Information disclosure or crash occurs

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

An application must explicitly pass user-controlled or attacker-influenced input to one of the affected mbstring functions (mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), or mb_detect_order()) or configure the mbstring.detect_order or mbstring.http_output INI settings with external input. The encoding parameter value must be deliverable via network (HTTP parameter, POST data, file upload metadata, Content-Type header, etc.). Exploitation specifically requires the encoding name to contain an embedded NUL byte (\x00), which must successfully traverse input handling without being stripped or rejected by earlier validation. Exploitation is limited to PHP versions 8.4.0-8.4.20 and 8.5.0-8.5.5; PHP 8.3.x and earlier versions are not vulnerable. The vulnerability does not require authentication or special privileges, and exploitation does not depend on non-default PHP configuration. However, if the application sanitizes or validates encoding names (rejecting NUL bytes, requiring known encoding names from a whitelist, or filtering special characters), exploitation is prevented. Default PHP installations with mbstring enabled but without explicit exposure of encoding parameters to untrusted input are at minimal risk.

Impact

CVSS 6.3 with CVSS:4.0 vector indicates moderate severity. Attack vector is network (AV:N) with low complexity (AC:L), meaning no authentication (PR:N) or user interaction (UI:N) is required, allowing remote exploitation. However, the AT:P (attack time = present) modifier suggests exploitation requires temporal conditions or specific request patterns. The vulnerability has limited confidentiality impact (VC:L) through information disclosure of global memory, and limited availability impact (SA:L) via crash-triggering. Integrity and remote system impact are not present (VI:N, VA:L as availability loss). EPSS score is not provided, limiting exploitation probability assessment. Critically, while network-accessible without authentication, the vulnerability requires crafting a request with an embedded NUL byte in an encoding parameter-a non-trivial but feasible precondition. The vulnerability is not listed as actively exploited (KEV status unknown), and no public exploit code has been identified. Real-world risk depends on deployment: applications that accept user-controlled encoding parameters via HTTP/API endpoints (e.g., web services, multi-language platforms) face higher risk than those with hardcoded encoding names. The information disclosure potential (reading arbitrary global memory) is more concerning than denial-of-service risk, particularly in scenarios where sensitive data (API keys, session tokens, cryptographic material) might reside in adjacent memory regions. The temporal modifier (RE:M = remediation medium) suggests vendor patch is available within expected timeframe.

Exploit ScenarioDerived

An attacker crafts an HTTP request to a web application that exposes encoding conversion functionality (e.g., a file upload service with charset detection, a REST API with content negotiation, or a legacy PHP application with user-controlled encoding parameters). The attacker includes a specially crafted encoding name containing an embedded NUL byte-for example, submitting 'UTF-8\x00AAAA...' as an encoding parameter. When the application passes this to mb_convert_encoding() or mb_detect_encoding(), the vulnerable strncasecmp() logic misinterprets the comparison, triggering an out-of-bounds read of global memory. If successful, the attacker can either cause a crash (denial of service) or, in more sophisticated exploitation, extract sensitive data from adjacent memory regions that may contain API keys, session tokens, or cryptographic material.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 10, 2026

Out-of-bounds read in PHP's mbstring extension allows remote attackers to trigger information disclosure or denial of service via specially crafted encoding names containing NUL bytes passed to mb_convert_encoding() and related functions. Affected versions: PHP 8.4.0-8.4.20 and 8.5.0-8.5.5. The vulnerability stems from unsafe string length comparison logic that misinterprets strncasecmp() return values when NUL bytes are present, potentially exposing global memory contents or crashing the application. No public exploit code identified at time of analysis.

RemediationAI

Upgrade immediately to PHP 8.4.21 or later, or to PHP 8.5.6 or later. Users on PHP 8.3 or earlier are unaffected and do not require patching. For environments unable to upgrade immediately, implement input validation to reject encoding parameter values containing NUL bytes (\x00 / chr(0) in PHP). This can be enforced at the application level before calling mbstring functions: validate user-supplied encoding names against a whitelist of valid encoding names (e.g., 'UTF-8', 'ISO-8859-1', 'Shift_JIS') or use preg_match('/^[a-zA-Z0-9_-]+$/', $encoding) to reject suspicious characters. Additionally, restrict access to PHP scripts that expose encoding parameters to trusted sources only if feasible, and consider disabling unused mbstring functionality. Note that disabling the mbstring extension entirely has high impact (breaks character encoding features in multi-language applications) but eliminates the attack surface; assess necessity based on application requirements. Security advisory available at https://github.com/php/php-src/security/advisories/GHSA-74r9-qxhc-fx53.

Affected VersionsENISA

PHP 8.5.* <8.5.6
PHP 8.4.* <8.4.21

Affected Packages

euvd php_8_4 fix: 8.4.21
euvd php_8_5 fix: 8.5.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The mbstring extension in PHP provides character encoding conversion and detection functions. The vulnerability exists in how these functions validate encoding names before processing. The root cause (CWE-125: out-of-bounds read) arises from a logic error in string comparison: the code uses strncasecmp() to compare encoding names but incorrectly assumes that a return value of 0 guarantees the strings have equal length. When an encoding name contains an embedded NUL byte (\x00), strncasecmp() truncates comparison at the NUL boundary, returning 0 even though the actual strings differ in length. This causes the function to read beyond the intended buffer boundary, accessing adjacent global memory. The affected functions include mb_convert_encoding() (for charset conversion), mb_detect_encoding() (for charset detection), mb_convert_variables() (batch conversion), and mb_detect_order() (detection priority). Additionally, the mbstring.detect_order and mbstring.http_output INI settings, which internally call these functions, are also affected. CPE designation a:php_group:php covers all PHP installations using the vulnerable mbstring extension.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
Vendor (php) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L/RE:M/U:Amber
SUSE 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Red Hat 8.2 HIGH

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: php

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
None
Subsequent system: Availability
Low

Lifecycle Timeline

3
Patch available
May 10, 2026 - 07:16 EUVD
CVSS changed
May 10, 2026 - 06:22 NVD
6.3 (MEDIUM)
CVE Published
May 10, 2026 - 04:35 nvd
MEDIUM 6.3

DescriptionCVE.org

In PHP versions 8.4.* before 8.4.21 and 8.5.* before 8.5.6, when an encoding name containing an embedded NUL byte is passed to mb_convert_encoding() or related mbstring functions, the code incorrectly assumes that when strncasecmp() returns 0 it means the strings have the same length. This can lead to out-of-bounds read of global memory, potentially causing a crash or information disclosure or crash. Affected functions include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), and mb_detect_order(), as well as the mbstring.detect_order and mbstring.http_output INI settings.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Legacy 15 SP7 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy