CVEfocus › CVE database › CVE-2025-58050

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

CVSS 6.9 MediumEPSS 1.0% (higher than 62% of CVEs)Published 2025-08-27Updated 2025-08-27Assigner: GitHub_M

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.

CWE-122CWE-125

What to do

Fixed builds are available from Alpine, Debian: see the table below for the fixed version per release.

PyPI has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

5Fixed
1Fix pending
34Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04pcre2Not affected
vulnerable_code_not_present
Ubuntu 22.04pcre2Not affected
vulnerable_code_not_present
Debian 14pcre2Fixed10.46-1DEBIAN-CVE-2025-58050
Debian 13pcre2Fixed10.46-1~deb13u1DEBIAN-CVE-2025-58050
Red Hat Enterprise Linux 10mingw32-pcre2Not affected
Red Hat Enterprise Linux 10mingw32-pcre2-staticNot affected
Red Hat Enterprise Linux 10mingw64-pcre2Not affected
Red Hat Enterprise Linux 10mingw64-pcre2-staticNot affected
Red Hat Enterprise Linux 10pcre2Not affected
Red Hat Enterprise Linux 10pcre2-develNot affected
Red Hat Enterprise Linux 10pcre2-staticNot affected
Red Hat Enterprise Linux 10pcre2-syntaxNot affected
Red Hat Enterprise Linux 10pcre2-toolsNot affected
Red Hat Enterprise Linux 10pcre2-utf16Not affected
Red Hat Enterprise Linux 10pcre2-utf32Not affected
Red Hat Enterprise Linux 9mingw32-pcre2Not affected
Red Hat Enterprise Linux 9mingw32-pcre2-staticNot affected
Red Hat Enterprise Linux 9mingw64-pcre2Not affected
Red Hat Enterprise Linux 9mingw64-pcre2-staticNot affected
Red Hat Enterprise Linux 9pcre2Not affected
Red Hat Enterprise Linux 9pcre2-develNot affected
Red Hat Enterprise Linux 9pcre2-syntaxNot affected
Red Hat Enterprise Linux 9pcre2-toolsNot affected
Red Hat Enterprise Linux 9pcre2-utf16Not affected
Red Hat Enterprise Linux 9pcre2-utf32Not affected
Red Hat Enterprise Linux 8pcre2Not affected
Red Hat Enterprise Linux 8pcre2-develNot affected
Red Hat Enterprise Linux 8pcre2-toolsNot affected
Red Hat Enterprise Linux 8pcre2-utf16Not affected
Red Hat Enterprise Linux 8pcre2-utf32Not affected
Red Hat Enterprise Linux 7pcre2Not affected
Red Hat Enterprise Linux 7pcre2-develNot affected
Red Hat Enterprise Linux 7pcre2-staticNot affected
Red Hat Enterprise Linux 7pcre2-toolsNot affected
Red Hat Enterprise Linux 7pcre2-utf16Not affected
Red Hat Enterprise Linux 7pcre2-utf32Not affected
Alpine Linux 3.24pcre2Fixed10.46-r0ALPINE-CVE-2025-58050
Alpine Linux 3.23pcre2Fixed10.46-r0ALPINE-CVE-2025-58050
Alpine Linux 3.22pcre2Fixed10.46-r0ALPINE-CVE-2025-58050
PyPI librarypcre2Fix pendingPYSEC-2025-259

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.