The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-6104

CVE-2026-6104: PHP mbstring Buffer Overflow Vulnerability

CVE-2026-6104 is a buffer overflow vulnerability in PHP's mbstring extension that can cause crashes or information disclosure. This article covers the technical details, affected versions, impact, and mitigation.

Published: May 18, 2026

CVE-2026-6104 Overview

CVE-2026-6104 is an out-of-bounds read vulnerability in PHP's multibyte string (mbstring) extension. The flaw affects PHP versions 8.4.* before 8.4.21 and 8.5.* before 8.5.6. When an encoding name containing an embedded NUL byte reaches mb_convert_encoding() or related mbstring functions, the implementation incorrectly assumes that a zero return from strncasecmp() implies equal string lengths. Attackers can leverage this assumption to read beyond the bounds of global memory. The condition can cause process crashes or expose memory contents, leading to information disclosure. The vulnerability is classified under [CWE-125] Out-of-bounds Read.

Critical Impact

Remote attackers controlling encoding parameters can trigger out-of-bounds reads of global memory, potentially crashing PHP processes or disclosing sensitive information.

Affected Products

  • PHP 8.4.* versions prior to 8.4.21
  • PHP 8.5.* versions prior to 8.5.6
  • Applications using mbstring.detect_order or mbstring.http_output INI settings

Discovery Timeline

  • 2026-05-10 - CVE-2026-6104 published to NVD
  • 2026-05-12 - Last updated in NVD database

Technical Details for CVE-2026-6104

Vulnerability Analysis

The vulnerability resides in PHP's mbstring extension, which handles multibyte character encoding conversions. Affected functions include mb_convert_encoding(), mb_detect_encoding(), mb_convert_variables(), and mb_detect_order(). The mbstring.detect_order and mbstring.http_output INI settings are also impacted.

When the extension parses an encoding name, it uses strncasecmp() to compare the supplied name against known encoding identifiers. A return value of zero from strncasecmp() only indicates that the first N bytes match case-insensitively. It does not guarantee that both strings have the same overall length. The mbstring code treats this result as equivalent to a full string match, allowing crafted input to be processed as a recognized encoding.

An EPSS score of 0.021% reflects low observed exploitation probability, but the network attack surface remains broad for applications that accept user-supplied encoding parameters.

Root Cause

The root cause is improper input validation combined with a flawed length assumption. An encoding name such as "UTF-8\0extra" causes strncasecmp() to return zero against the legitimate "UTF-8" identifier. The code then proceeds with subsequent operations using the attacker-influenced full string length, leading to reads beyond the intended buffer boundaries in global memory.

Attack Vector

Exploitation requires the attacker to inject an encoding name containing an embedded NUL byte into a vulnerable mbstring function call. This is reachable in any PHP application that accepts encoding identifiers from HTTP parameters, headers, request bodies, or other user-controlled inputs. The attack is network-based and requires no authentication or user interaction. Successful exploitation results in either a denial of service through process crash or disclosure of adjacent global memory contents.

No verified public proof-of-concept code is currently available. Refer to the PHP Security Advisory GHSA-74r9-qxhc-fx53 for upstream technical details.

Detection Methods for CVE-2026-6104

Indicators of Compromise

  • HTTP requests containing encoding parameter values with embedded NUL bytes (%00) followed by additional characters
  • Unexpected PHP-FPM or Apache worker crashes correlated with requests invoking mbstring functions
  • Application error logs referencing segmentation faults during mb_convert_encoding() or mb_detect_encoding() calls
  • Anomalous responses containing fragments of memory data when encoding parameters are manipulated

Detection Strategies

  • Inspect web application firewall logs for URL-encoded NUL bytes (%00) within parameters known to feed mbstring functions
  • Monitor PHP error logs for repeated worker process crashes tied to specific request patterns
  • Audit application source code for mbstring function calls that accept encoding names from untrusted input

Monitoring Recommendations

  • Enable verbose PHP error logging to capture mbstring-related faults
  • Deploy runtime application self-protection (RASP) or WAF rules that reject encoding parameters containing NUL bytes
  • Track PHP version inventory across all web-facing hosts to identify unpatched instances of 8.4.x and 8.5.x

How to Mitigate CVE-2026-6104

Immediate Actions Required

  • Upgrade PHP 8.4.x installations to version 8.4.21 or later
  • Upgrade PHP 8.5.x installations to version 8.5.6 or later
  • Identify all application entry points that pass user input to mbstring functions and add input validation
  • Restart PHP-FPM, Apache, or other PHP-hosting services after applying the patch

Patch Information

The PHP project released fixes in versions 8.4.21 and 8.5.6. The patches correct the length comparison logic following strncasecmp() calls within the mbstring extension. Refer to the PHP Security Advisory GHSA-74r9-qxhc-fx53 for the official patch references and commit details.

Workarounds

  • Reject any user-supplied encoding parameter that contains a NUL byte before passing it to mbstring functions
  • Restrict accepted encoding values to a hardcoded allowlist using strict equality checks rather than relying on mbstring's internal matching
  • Disable mbstring extension on hosts that do not require multibyte encoding functionality
bash
# Configuration example - verify PHP version and validate encoding input
php -v
# Expected output for patched systems: PHP 8.4.21 or PHP 8.5.6 (or later)

# Example input validation in PHP application code:
# if (strpos($encoding, "\0") !== false) { reject_request(); }
# $allowed = ['UTF-8', 'ISO-8859-1', 'ASCII'];
# if (!in_array($encoding, $allowed, true)) { reject_request(); }

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPhp

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:M/U:Amber
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-125
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-14178: PHP Buffer Overflow Vulnerability

  • CVE-2024-8932: PHP ldap_escape() Buffer Overflow Flaw

  • CVE-2024-11236: PHP ldap_escape() Buffer Overflow Flaw

  • CVE-2024-11233: PHP Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English