Vulnerability · Published Aug 27, 2025 · Assigned by GitHub_M

CVE-2025-58050PCRE2: heap-buffer-overflow read in match_ref due to missing boundary restoration in SCS

Medium 6.9

In plain English

A medium-severity out-of-bounds read in pcre2 from PCRE2Project. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 59% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.9Medium
Exploit odds (30 days)0.9%top 41.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

The PCRE2 library is a set of C functions that implement regular expression pattern matching. In version 10.45, a heap-buffer-overflow read vulnerability exists in the PCRE2 regular expression matching engine, specifically within the handling of the (*scs:...) (Scan SubString) verb when combined with (*ACCEPT) in src/pcre2_match.c. This 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 issue has been resolved in version 10.46.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.22pcre210.46-r0ALPINE-CVE-2025-58050
Alpine:v3.23pcre210.46-r0ALPINE-CVE-2025-58050
Alpine:v3.24pcre210.46-r0ALPINE-CVE-2025-58050
Debian:13pcre210.46-1~deb13u1DEBIAN-CVE-2025-58050
Debian:14pcre210.46-1DEBIAN-CVE-2025-58050
PyPIpcre2no fix listedPYSEC-2025-259

Affected products (as reported)

VendorProductVersions
PCRE2Project pcre2 = 10.45

Weakness: CWE-125, CWE-122 · 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

References