CVE-2025-58050 PCRE2: heap-buffer-overflow read in match_ref due to missing boundary restoration in SCS
MediumCVSS 6.9
EPSS 0.92%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- Debian
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.
Upgrade path
8 packages: 6 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/pcre2(Alpine v3.22) | < 10.46-r0 | 10.46-r0 | Fixed |
| alpine/pcre2(Alpine v3.23) | < 10.46-r0 | 10.46-r0 | Fixed |
| alpine/pcre2(Alpine v3.24) | < 10.46-r0 | 10.46-r0 | Fixed |
| debian/pcre2(Debian 13) | < 10.46-1~deb13u1; = 10.45-1 | 10.46-1~deb13u1 | Fixed |
| debian/pcre2(Debian 14) | < 10.46-1; = 10.45-1; = 10.46-1~deb13u1 | 10.46-1 | Fixed |
| pypi pcre2(PyPI) | <= 10.45; = 0.1.0; = 0.2.0; = 0.3.0 +7 more | after 10.45 | Fixed |
| PCRE2 | = 10.45 | No fix listed | Versions listed |
| PCRE2Project pcre2 | = = 10.45 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi pcre2(PyPI) | <= 10.45 | No fix listed |
| pypi pcre2(PyPI) | = 0.1.0 | No fix listed |
| pypi pcre2(PyPI) | = 0.2.0 | No fix listed |
| pypi pcre2(PyPI) | = 0.3.0 | No fix listed |
| pypi pcre2(PyPI) | = 0.4.0 | No fix listed |
| pypi pcre2(PyPI) | = 0.5.0 | No fix listed |
| pypi pcre2(PyPI) | = 0.5.1 | No fix listed |
| pypi pcre2(PyPI) | = 0.5.2 | No fix listed |
| pypi pcre2(PyPI) | = 0.5.3 | No fix listed |
| pypi pcre2(PyPI) | = 0.6.0 | No fix listed |
| pypi pcre2(PyPI) | = 0.7.0 | No fix listed |
| debian/pcre2(Debian:13) | < 10.46-1~deb13u1 | 10.46-1~deb13u1 |
| debian/pcre2(Debian:13) | = 10.45-1 | No fix listed |
| debian/pcre2(Debian:14) | < 10.46-1 | 10.46-1 |
| debian/pcre2(Debian:14) | = 10.45-1 | No fix listed |
| debian/pcre2(Debian:14) | = 10.46-1~deb13u1 | No fix listed |
| PCRE2Project pcre2 | = = 10.45 | No fix listed |
| alpine/pcre2(Alpine:v3.22) | < 10.46-r0 | 10.46-r0 |
| alpine/pcre2(Alpine:v3.23) | < 10.46-r0 | 10.46-r0 |
| alpine/pcre2(Alpine:v3.24) | < 10.46-r0 | 10.46-r0 |
| PCRE2 | = 10.45 | No fix listed |
References
- https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.46 release-notes vendor-advisory
- https://github.com/PCRE2Project/pcre2/commit/a141712e5967d448c7ce13090ab530c8e3d82254 patch
- https://github.com/PCRE2Project/pcre2/security/advisories/GHSA-c2gv-xgf5-5cc2 exploit vendor-advisory
- Debian Security Tracker CVE-2025-58050 vendor-advisory
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking