CVSS 4.0
6.9 mediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:LMedium (6.9) in pcre pcre2. EPSS 0.9% estimated probability of exploitation activity in the next 30 days.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:L/SI:N/SA:LCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:HExplain CVE-2025-58050 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-58050?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-58050?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-58050 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| pcre:pcre2 | 10.45 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| PYSEC-2025-259 | PyPI | pcre2 | <=10.45 | no fix published |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 13 | pcre2 | 10.46-1~deb13u1 | DEBIAN-CVE-2025-58050 |
| Debian | 14 | pcre2 | 10.46-1 | DEBIAN-CVE-2025-58050 |
| Ubuntu | 25.04 | pcre2 | 10.45-1ubuntu0.1 | USN-7777-1 |
| SUSE | Linux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0 | pcre2 | 10.45-160000.3.1 | SUSE-SU-2026:21172-1 |
| SUSE | Linux Micro 6.2 | pcre2 | 10.45-160000.3.1 | SUSE-SU-2026:21094-1 |
| openSUSE | Leap 16.0 | pcre2 | 10.45-160000.3.1 | openSUSE-SU-2026:20512-1 |
| openSUSE | Tumbleweed | pcre2 | 10.46-1.1 | openSUSE-SU-2025:15501-1 |
| Alpine | v3.22, v3.23, v3.24 | pcre2 | 10.46-r0 | ALPINE-CVE-2025-58050 |
| Alpaquita | stream | pcre2 | 10.46-r0 | BELL-CVE-2025-58050 |
| BellSoft Hardened Containers | stream | pcre2 | 10.46-r0 | BELL-CVE-2025-58050 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.
Red Hat rates this Moderate.
The bug is in src/pcre2_match.c. When (*scs:...) temporarily restricts the match boundaries to a captured substring, the engine restores the current subject pointer (Feptr) correctly on an immediate (*ACCEPT), but it fails to restore mb->end_subject and mb->true_end_subject. If execution later calls match_ref (for example for a backreference like \2), the bounds check can underflow because mb->end_subject - eptr becomes negative and is cast to an unsigned size. That makes the length check pass incorrectly and memcmp reads past the end of the allocated buffer, causing a heap-buffer-overflow read.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | mingw-pcre2 | Not affected | |
| Red Hat Enterprise Linux 10 | pcre2 | Not affected | |
| Red Hat Enterprise Linux 7 | pcre2 | Not affected | |
| Red Hat Enterprise Linux 8 | pcre2 | Not affected | |
| Red Hat Enterprise Linux 9 | mingw-pcre2 | Not affected | |
| Red Hat Enterprise Linux 9 | pcre2 | Not affected | |
| Red Hat OpenShift Container Platform 4 | openshift/ose-rhel-coreos-8 | Not affected | |
| Red Hat OpenShift Container Platform 4 | openshift/ose-rhel-coreos-9 | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-58050.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.