CVE-2025-8058

published 23 Jul 2025 · updated 4 Nov 2025

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.

5.9MediumCVSS 5.9EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in 2.42.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
The GNU C Library>=2.4 <2.422.42

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-8058 severity on Zeptric[![CVE-2025-8058](https://zeptric.io/badge/cve/CVE-2025-8058.svg)](https://zeptric.io/cve/CVE-2025-8058)