Skip to content

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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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