Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2025-8058

CVE-2025-8058: GNU C Library Buffer Overflow Vulnerability

CVE-2025-8058 is a buffer overflow flaw in GNU C Library versions 2.4 to 2.41 affecting the regcomp function. A double free condition can lead to buffer manipulation. This article covers technical details, impact, and fixes.

Updated: January 22, 2026

CVE-2025-8058 Overview

CVE-2025-8058 is a Double Free vulnerability affecting the regcomp function in the GNU C library (glibc) versions 2.4 through 2.41. The vulnerability occurs when a previous memory allocation fails during regex compilation, either due to a natural malloc failure or through an interposed malloc that injects random failures. This double free condition can allow buffer manipulation depending on how the regex pattern is constructed, potentially leading to memory corruption and system instability.

Critical Impact

A successful exploitation of this double free vulnerability could allow attackers to manipulate memory buffers, potentially leading to arbitrary code execution or denial of service on systems running affected glibc versions across all supported architectures and ABIs.

Affected Products

  • GNU C Library (glibc) versions 2.4 through 2.41
  • All architectures and ABIs supported by glibc
  • Linux distributions using affected glibc versions

Discovery Timeline

  • 2025-07-23 - CVE-2025-8058 published to NVD
  • 2025-11-04 - Last updated in NVD database

Technical Details for CVE-2025-8058

Vulnerability Analysis

The regcomp function in glibc is responsible for compiling POSIX regular expressions into an internal representation that can be used by regexec for pattern matching. This vulnerability (CWE-415: Double Free) arises from improper memory management when allocation failures occur during the compilation process.

When a memory allocation operation fails within the regex compilation workflow, the error handling code path attempts to free memory resources that may have already been freed or were never successfully allocated. This creates a double free condition where the same memory region is passed to free() twice.

The attack surface requires local access and involves triggering specific memory allocation failure conditions. An attacker could potentially exploit this by crafting specific regex patterns combined with memory pressure conditions, or by using an interposed malloc implementation that deliberately injects allocation failures at strategic points.

Root Cause

The root cause lies in the error handling logic within regcomp that fails to properly track which memory allocations have succeeded and which have failed. When an allocation fails partway through the compilation process, the cleanup code does not correctly account for the state of previously allocated memory blocks, leading to double free conditions.

The issue affects the fundamental regex compilation infrastructure in glibc, making it relevant across all architectures and ABI configurations that use these regex functions.

Attack Vector

The attack vector is local, requiring the attacker to have the ability to influence regex compilation on the target system. Exploitation scenarios include:

  • Applications that compile user-supplied regular expressions where memory conditions can be influenced
  • Systems under memory pressure where natural malloc failures may occur during regex operations
  • Environments where a malicious interposed malloc library can inject controlled failures

The double free can lead to heap corruption, where freed memory chunks become corrupted or point to unexpected memory locations. Depending on the regex construction and heap layout, this could potentially be leveraged for further memory manipulation.

For technical details on the vulnerability mechanism and the specific code paths involved, see the Sourceware Bug Report #33185 and the Openwall OSS Security Discussion.

Detection Methods for CVE-2025-8058

Indicators of Compromise

  • Unexpected application crashes or segmentation faults in processes using regex operations
  • Double free error messages in system logs from memory debugging tools (ASAN, valgrind)
  • Anomalous memory allocation patterns in applications performing regex compilation
  • Core dumps indicating heap corruption in glibc regex-related functions

Detection Strategies

  • Monitor for processes crashing with heap corruption signatures in regcomp or related regex functions
  • Deploy memory sanitizers (AddressSanitizer) in development and testing environments to detect double free conditions
  • Implement log analysis for malloc/free debugging output indicating double-free attempts
  • Use runtime detection tools that can identify memory management violations in glibc functions

Monitoring Recommendations

  • Enable crash reporting and core dump analysis on systems running applications with user-supplied regex processing
  • Monitor system memory utilization patterns for unusual behavior that could indicate exploitation attempts
  • Track glibc version deployment across infrastructure to identify vulnerable systems
  • Implement application-level monitoring for regex compilation failures and error rates

How to Mitigate CVE-2025-8058

Immediate Actions Required

  • Update glibc to the patched version (post-2.41 with the security fix applied)
  • Identify all systems running glibc versions 2.4 through 2.41
  • Prioritize patching on systems that process untrusted regex patterns
  • Review applications that compile user-supplied regular expressions

Patch Information

The GNU C Library maintainers have addressed this vulnerability through a commit to the glibc repository. The fix corrects the memory management logic in the regex compilation error handling path to prevent double free conditions.

The patch is available in the glibc Git repository with commit hash 3ff17af18c38727b88d9115e536c069e6b5d601f. System administrators should update to a glibc version that includes this fix or apply the patch directly if building from source.

Additional technical discussion and context can be found in the Sourceware Bug Report #33185.

Workarounds

  • Limit regex compilation to trusted input sources where possible
  • Implement input validation and length limits on regex patterns before compilation
  • Use alternative regex libraries (such as PCRE2) for applications requiring user-supplied patterns until patching is complete
  • Deploy memory monitoring tools to detect and terminate processes exhibiting double free behavior
bash
# Check current glibc version on the system
ldd --version

# Example: Verify glibc version and determine if patching is required
# Systems running glibc 2.4 through 2.41 should be prioritized for updates
rpm -q glibc || dpkg -l libc6 | grep libc6

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechGlibc

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:H/SC:L/SI:L/SA:H/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
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityHigh
  • CWE References
  • CWE-415
  • Technical References
  • Sourceware Bug Report #33185

  • Sourceware glibc Commit

  • Openwall OSS Security Discussion
  • Related CVEs
  • CVE-2026-4438: GNU C Library Information Disclosure Flaw

  • CVE-2025-0577: glibc Insufficient Entropy Vulnerability

  • CVE-2026-0915: GNU C Library Information Disclosure Flaw

  • CVE-2021-43396: GNU Glibc iconv() Data Integrity Flaw
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