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
    • 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-2025-58050

CVE-2025-58050: PCRE2 Buffer Overflow Vulnerability

CVE-2025-58050 is a heap-buffer-overflow vulnerability in PCRE2 version 10.45 affecting regular expression matching. This flaw may lead to information disclosure. Learn about technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2025-58050 Overview

CVE-2025-58050 is a heap-buffer-overflow read vulnerability in the PCRE2 (Perl Compatible Regular Expressions 2) library, a widely-used set of C functions that implement regular expression pattern matching. The vulnerability exists within the handling of the (*scs:...) (Scan SubString) verb when combined with (*ACCEPT) in src/pcre2_match.c. This flaw affects version 10.45 of the library and may potentially lead to information disclosure if the out-of-bounds data read during the memcmp operation affects the final match result in a way observable by an attacker.

Critical Impact

This heap-buffer-overflow read vulnerability in PCRE2's regex matching engine could allow attackers to potentially disclose sensitive information through crafted regular expression patterns, affecting applications that rely on PCRE2 for pattern matching.

Affected Products

  • PCRE2 version 10.45
  • Applications and systems using PCRE2 10.45 for regular expression processing
  • Any software dependent on the vulnerable pcre2_match.c component

Discovery Timeline

  • 2025-08-27 - CVE CVE-2025-58050 published to NVD
  • 2025-09-09 - Last updated in NVD database

Technical Details for CVE-2025-58050

Vulnerability Analysis

The vulnerability is classified under CWE-122 (Heap-based Buffer Overflow) and CWE-787 (Out-of-bounds Write). The flaw resides in the PCRE2 regular expression matching engine's handling of the Scan SubString verb (*scs:...) when used in conjunction with the (*ACCEPT) directive.

When processing these specific pattern constructs, the matching engine fails to properly restore the buffer boundaries after an ACCEPT operation occurs inside a scan substring block. This causes the engine to operate with incorrect buffer bounds, leading to an out-of-bounds read during subsequent memcmp operations. The network-accessible attack vector means malicious patterns could potentially be submitted remotely to vulnerable applications that accept user-provided regular expressions.

Root Cause

The root cause of this vulnerability lies in improper state management within the pcre2_match.c source file. Specifically, when an (*ACCEPT) operation is executed inside a Scan SubString block, the saved buffer boundaries (end_subject, true_end_subject, and moptions) are not properly restored before continuing execution. This leaves the matching engine operating with stale buffer boundaries from the substring context, causing it to read beyond the intended buffer limits during subsequent memory comparison operations.

Attack Vector

An attacker can exploit this vulnerability by crafting a malicious regular expression pattern that combines the (*scs:...) verb with (*ACCEPT) in a specific sequence. When a vulnerable application processes this pattern, the heap-buffer-overflow read occurs. If the out-of-bounds data influences the matching result in an observable manner, the attacker may be able to infer information about adjacent heap memory contents, potentially leading to information disclosure.

The attack requires the ability to supply regular expression patterns to an application using PCRE2 10.45. This could be achieved through web application input fields, API endpoints, configuration files, or any other mechanism that allows user-controlled regex patterns.

c
// Security patch from src/pcre2_match.c - Restore buffer after an ACCEPT inside a scan substring block
               assert_accept_frame->offset_top * sizeof(PCRE2_SIZE));
         Foffset_top = assert_accept_frame->offset_top;
         Fmark = assert_accept_frame->mark;
+        mb->end_subject = Lsaved_end_subject;
+        mb->true_end_subject = mb->end_subject + Ltrue_end_extra;
+        mb->moptions = Lsaved_moptions;
         break;
         }

Source: GitHub Commit a141712e

Detection Methods for CVE-2025-58050

Indicators of Compromise

  • Unusual application crashes or memory access violations in processes using PCRE2
  • Regex-related error logs indicating unexpected pattern matching behavior
  • Memory corruption patterns detected in heap regions adjacent to PCRE2 allocations
  • Anomalous regex patterns containing (*scs:...) combined with (*ACCEPT) constructs

Detection Strategies

  • Monitor for applications using PCRE2 version 10.45 through software inventory scanning
  • Implement input validation to detect and filter suspicious regex patterns containing (*scs: and (*ACCEPT) combinations
  • Deploy memory sanitizers (AddressSanitizer, Valgrind) in development and testing environments to identify heap-buffer-overflow conditions
  • Review application logs for regex processing errors that may indicate exploitation attempts

Monitoring Recommendations

  • Enable detailed logging for regex pattern processing in applications using PCRE2
  • Implement real-time monitoring for memory access violations and heap corruption events
  • Set up alerts for unusually complex or lengthy regular expression patterns submitted to applications
  • Monitor for applications accessing PCRE2 library functions with unexpected frequency or patterns

How to Mitigate CVE-2025-58050

Immediate Actions Required

  • Upgrade PCRE2 to version 10.46 or later immediately
  • Identify all applications and dependencies using PCRE2 10.45 through software composition analysis
  • Restrict user input of regular expressions where possible until patching is complete
  • Implement input validation to reject patterns containing potentially dangerous verb combinations

Patch Information

The PCRE2 development team has released version 10.46 which resolves this vulnerability. The fix properly restores the buffer boundaries (end_subject, true_end_subject, and moptions) after an (*ACCEPT) operation completes inside a Scan SubString block. Organizations should update to PCRE2 10.46 or later as documented in the GitHub Release pcre2-10.46. The specific commit addressing this issue can be reviewed at the GitHub Commit Update. Additional details are available in the GitHub Security Advisory GHSA-c2gv-xgf5-5cc2.

Workarounds

  • Implement input filtering to reject regex patterns containing (*scs: substring constructs
  • Sandbox applications that process user-supplied regular expressions
  • Limit regex pattern complexity and length through application-level validation
  • Consider temporarily disabling features that allow user-defined regular expressions until patching is complete
bash
# Check current PCRE2 version
pcre2-config --version

# Update PCRE2 on Debian/Ubuntu systems
sudo apt-get update && sudo apt-get install --only-upgrade libpcre2-dev

# Update PCRE2 on RHEL/CentOS systems
sudo yum update pcre2

# Verify update was successful
pcre2-config --version

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPcre2

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/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:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-122

  • CWE-787
  • Technical References
  • GitHub Release pcre2-10.46
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-c2gv-xgf5-5cc2
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
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