CVE-2025-58050
JSON

6.9medium

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

Severity
6.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.98% (higher than 63% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
PYSEC-2025-259GHSA-c2gv-xgf5-5cc2

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

Product or packageVersionsReported by
PCRE2Project pcre2= 10.45CVE List
pcre pcre210.45NVD
pcre2 (PyPI)up to 10.45PyPA Advisory Database

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
PyPA Advisory Database9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Classification

CWE-122CWE-125CWE-787

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

La librería PCRE2 es un conjunto de funciones de C que implementan la coincidencia de patrones con expresiones regulares. En la versión 10.45, existe una vulnerabilidad de lectura por desbordamiento de búfer de montón en el motor de coincidencia de expresiones regulares de PCRE2, específicamente en la gestión del verbo (*scs:...) (Scan SubString) al combinarse con (*ACCEPT) en src/pcre2_match.c. Esta vulnerabilidad podría provocar la divulgación de información si los datos fuera de los límites leídos durante la memcmp afectan el resultado final de la coincidencia de forma observable para el atacante. Este problema se ha resuelto en la versión 10.46.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-58050 changed 2025-08-27CVE Terms of Use
NVDCVE-2025-58050 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-259 changed 2026-07-13CC-BY-4.0