CVE-2025-58050: pcre pcre2 Heap-based Buffer Overflow
Vulnerability summary
CVE-2025-58050 is a critical (CVSS 9.1) Heap-based Buffer Overflow vulnerability in pcre pcre2. EPSS estimates a 0.80% chance of exploitation in the next 30 days, higher than 55.8% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 27-08-2025PublishedVulnerability first disclosed.
- 27-08-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
8 scores · 6 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated6.9MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L
- NVDNIST6.9MediumCVSS: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
- OSV · AlpineEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- OSV · PypiEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- OSV · DebianEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
EPSS trend
Probability
0.80%
Chance of exploitation in the next 30 days
Percentile
56%
Versus all other CVEs
30-day change
0.00 pp
From 0.80% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundPcre2
Maturity: poc
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-125Out-of-bounds ReadThe product reads data past the end, or before the beginning, of the intended buffer.
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
Suse3 products
- pcre2&distro=SUSE Linux Enterprise Server 16.0< 10.45-160000.3.1
- pcre2&distro=SUSE Linux Enterprise Server for SAP applications 16.0< 10.45-160000.3.1
- pcre2&distro=SUSE Linux Micro 6.2< 10.45-160000.3.1
Opensuse2 products
- pcre2&distro=openSUSE Leap 16.0< 10.45-160000.3.1
- pcre2&distro=openSUSE Tumbleweed< 10.46-1.1
Alpine1 product
- pcre2< 10.46-r0
Debian1 product
- pcre2< 10.46-1~deb13u1 | < 10.46-1
Pcre1 product
- pcre210.45
Pcre2project1 product
- pcre2= 10.45
PyPI1 product
- pcre2≤ 10.45
Ubuntu1 product
- pcre2< 10.45-1ubuntu0.1
8 vendors · 11 products
References
12 links- github.com/PCRE2Project/pcre2/security/advisories/GHSA-c2gv-xgf5-5cc2X Refsource CONFIRMEVIDENCEREPORTExploitVendor Advisory
- github.com/PCRE2Project/pcre2/commit/a141712e5967d448c7ce13090ab530c8e3d82254X Refsource MISCFIXPatch