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 package | Versions | Reported by |
|---|---|---|
| PCRE2Project pcre2 | = 10.45 | CVE List |
| pcre pcre2 | 10.45 | NVD |
| pcre2 (PyPI) | up to 10.45 | PyPA Advisory Database |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:L |
| NVD | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
| PyPA Advisory Database | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
Classification
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
| https://github.com/PCRE2Project/pcre2/security/advisories/GHSA-c2gv-xgf5-5cc2 | evidence, exploit, vendor-advisory | |
| https://github.com/PCRE2Project/pcre2/commit/a141712e5967d448c7ce13090ab530c8e3d82254 | fix, patch | |
| https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.46 | advisory, release-notes | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-58050 changed 2025-08-27 | CVE Terms of Use |
| NVD | CVE-2025-58050 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2025-259 changed 2026-07-13 | CC-BY-4.0 |