Skip to content
OpenAdvisories
Medium · 6.9 CVE-2025-58050 EUVD-2025-25947GHSA-c2gv-xgf5-5cc2PYSEC-2025-259

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

Published Aug 27, 2025 · Updated Aug 27, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
PCRE2Project pcre2 = 10.45 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pcre2 10.46-1 —
Debian 13 pcre2 10.46-1~deb13u1 —
ReleasePackageFixed inAdvisory
Ubuntu 25.04 pcre2 10.45-1ubuntu0.1 USN-7777-1
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 pcre2 10.45-160000.3.1 SUSE-SU-2026:21172-1
SLES 16.0 pcre2 10.45-160000.3.1 SUSE-SU-2026:21172-1
SLE Micro 6.2 pcre2 10.45-160000.3.1 SUSE-SU-2026:21094-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed pcre2 10.46-1.1 openSUSE-SU-2025:15501-1
openSUSE Leap 16.0 pcre2 10.45-160000.3.1 openSUSE-SU-2026:20512-1
ReleasePackageFixed inAdvisory
Alpine v3.24 pcre2 10.46-r0 —
Alpine v3.23 pcre2 10.46-r0 —
Alpine v3.22 pcre2 10.46-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pcre2 <= 10.45 — PYSEC-2025-259

Advisories 9

References