CVE-2025-8058

glibc: Double free in glibc

Published Jul 23, 2025 CVSS 4.0 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4621-1 glibc security update
EUVD EUVD EUVD-2025-22469 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.
Ubuntu USN Ubuntu USN USN-7760-1 GNU C Library vulnerability
History
Type Values Removed Values Added
Title glibc: Double free in glibc
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Gnu
Gnu glibc
Vendors & Products Gnu
Gnu glibc
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Weaknesses CWE-415
References
Metrics cvssV4_0

{'score': 5.9, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:H/SC:L/SI:L/SA:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
glibc
Published
Updated
Nov 4, 2025, 9:15 PM
Reserved
Jul 22, 2025, 6:33 PM
Status
Deferred
Published
Jul 23, 2025, 8:15 PM
Modified
Jun 17, 2026, 10:06 AM
Severity
Moderate
Public date
Jul 23, 2025, 7:57 PM