CVE-2025-58050
NixOS vulnerability analysis and mitigation

Overview

The PCRE2 library (version 10.45) contains a heap-buffer-overflow read vulnerability (CVE-2025-58050) in its regular expression matching engine, specifically within the handling of the (scs:...) (Scan SubString) verb when combined with (ACCEPT) in src/pcre2_match.c. The vulnerability was discovered and disclosed on August 27, 2025, affecting the PCRE2 regular expression pattern matching library (NVD, GitHub Advisory).

Technical details

The vulnerability occurs when a pattern inside the (scs:...) block succeeds via an immediate (ACCEPT). While the engine correctly restores the current subject pointer to its position before the SCS assertion, it fails to restore the original mb->endsubject and mb->trueend_subject values. These pointers remain incorrectly pointing to the end of the scanned substring. The issue manifests when subsequent operations, such as backreferences, are attempted, potentially leading to a heap-buffer-overflow read condition. The vulnerability has been assigned a CVSS v4.0 base score of 6.9 (Medium) with vector string 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 (GitHub Advisory).

Impact

The vulnerability may potentially lead to information disclosure if the out-of-bounds data read during the memcmp affects the final match result in a way observable by the attacker. This could have implications of denial-of-service or information disclosure, and could potentially be used to escalate other vulnerabilities in a system (GitHub Release).

Mitigation and workarounds

The vulnerability has been fixed in PCRE2 version 10.46. This security-only release includes a minimal code change to prevent the read-past-the-end memory error. Users are advised to upgrade to version 10.46 or later to address this security issue (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-12819HIGH8.1
  • NixOSNixOS
  • pgbouncer
NoYesDec 03, 2025
CVE-2025-20777MEDIUM6.7
  • NixOSNixOS
  • android
NoNoDec 02, 2025
CVE-2025-65105MEDIUM5.3
  • NixOSNixOS
  • apptainer
NoYesDec 02, 2025
CVE-2025-20789MEDIUM4.4
  • NixOSNixOS
  • android
NoNoDec 02, 2025
CVE-2025-20788MEDIUM4.4
  • NixOSNixOS
  • android
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management