CVE-2025-8058
The regcomp function in the GNU C library version from 2.4 to 2.41 is subject to a double free if some previous allocat…
Mitigation
- Upgrade glibc to 2.42 or later.
Who should check
- Anyone running The GNU C Library glibc >= 2.4, < 2.42
Vulnerability facts
- Affected
- The GNU C Library glibc >= 2.4, < 2.42
- Fixed in
- The GNU C Library glibc 2.42
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.9 (v4.0, CNA)CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:H/SC:L/SI:L/SA:HOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Attack requirements: Present
- Privileges required: Low
- User interaction: Passive
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: High
- Confidentiality impact on other systems: Low
- Integrity impact on other systems: Low
- Availability impact on other systems: High
- EPSS
- 0.23% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- CWE
- CWE-415
- Modified
Description
The regcomp function in the GNU C library version from 2.4 to 2.41 is subject to a double free if some previous allocation fails. It can be accomplished either by a malloc failure or by using an interposed malloc that injects random malloc failures. The double free can allow buffer manipulation depending of how the regex is constructed. This issue affects all architectures and ABIs supported by the GNU C library.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| The GNU C Library glibc | >= 2.4, < 2.42 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-8058. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-8058.md Affected: The GNU C Library glibc >= 2.4, < 2.42 Fixed in: The GNU C Library glibc 2.42 Steps: 1. Search this machine and project for The GNU C Library glibc: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2025-8058 being exploited?
There is no confirmed exploitation: CVE-2025-8058 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-8058?
Medium: CVSS 5.9 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2025-8058?
The GNU C Library glibc >= 2.4, < 2.42.
Is there a fix for CVE-2025-8058?
Yes. Fixed in The GNU C Library glibc 2.42. Upgrade glibc to 2.42 or later.
How do I check if I'm affected by CVE-2025-8058?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.