Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: 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 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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-8058
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:38 UTC · Revision 1

Source evidence

CVE-2025-8058

core-osv · Original source

Published 23 Jul 2025, 19:57 UTC

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.

osv:CVE-2025-8058
Complete source record
{
  "id": "a69853d17b4b85f4b8d9e32423dd23690f4ffb7e916b14bd26ccceefa33355fd",
  "url": "https://osv.dev/vulnerability/CVE-2025-8058",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2025-8058",
    "summary": "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.",
    "evidence": "osv:CVE-2025-8058",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-8058",
      "aliases": [
        "CVE-2025-8058"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://sourceware.org/git/glibc.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3858bf28a66f449cc2d815122032a60cf9bf793e"
                },
                {
                  "fixed": "d2097651cc57834dbfcaa102ddfacae0d86cfb66"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "2.4"
                      },
                      {
                        "fixed": "2.42"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  }
                ]
              }
            }
          ],
          "versions": [
            "glibc-2.41.9000",
            "glibc-2.41",
            "glibc-2.40",
            "glibc-2.40.9000",
            "glibc-2.39.9000",
            "glibc-2.39",
            "glibc-2.38",
            "glibc-2.38.9000",
            "glibc-2.37",
            "glibc-2.37.9000",
            "glibc-2.36",
            "glibc-2.36.9000",
            "glibc-2.35",
            "glibc-2.35.9000",
            "glibc-2.34",
            "glibc-2.34.9000",
            "glibc-2.33",
            "glibc-2.33.9000",
            "glibc-2.32",
            "glibc-2.32.9000",
            "glibc-2.31",
            "glibc-2.31.9000",
            "changelog-ends-here",
            "glibc-2.30",
            "glibc-2.30.9000",
            "glibc-2.29",
            "glibc-2.29.9000",
            "glibc-2.28",
            "glibc-2.28.9000",
            "glibc-2.27",
            "glibc-2.27.9000",
            "glibc-2.26",
            "glibc-2.26.9000",
            "glibc-2.25",
            "glibc-2.25.90",
            "glibc-2.24",
            "glibc-2.24.90",
            "glibc-2.23",
            "glibc-2.23.90",
            "glibc-2.22",
            "glibc-2.22.90",
            "glibc-2.21",
            "glibc-2.21.90",
            "glibc-2.20",
            "glibc-2.20.90",
            "glibc-2.19",
            "glibc-2.19.90",
            "glibc-2.18",
            "glibc-2.18.90",
            "glibc-2.17",
            "glibc-2.17.90",
            "glibc-2.16.0",
            "glibc-2.16.90",
            "glibc-2.16-ports-merge",
            "glibc-2.16",
            "glibc-2.16-tps",
            "glibc-2.15",
            "glibc-2.14.9000",
            "glibc-2.14",
            "glibc-2.13",
            "glibc-2.12",
            "glibc-2.11",
            "cvs/glibc-2_8-base",
            "cvs/fedora-glibc-20090510T1842",
            "glibc-2.10",
            "cvs/glibc-2_10-base",
            "cvs/glibc-2_10",
            "cvs/fedora-glibc-20090509T2200",
            "cvs/fedora-glibc-20090509T1828",
            "cvs/fedora-glibc-20090427T1419",
            "cvs/fedora-glibc-20090424T1908",
            "cvs/fedora-glibc-20090424T0747",
            "cvs/fedora-glibc-20090416T1610",
            "cvs/fedora-glibc-20090416T0610",
            "cvs/fedora-glibc-20090415T1619",
            "cvs/fedora-glibc-20090414T2104",
            "cvs/fedora-glibc-20090409T1422",
            "cvs/fedora-glibc-20090408T1602",
            "cvs/fedora-glibc-20090407T0657",
            "cvs/fedora-glibc-20090407T0545",
            "cvs/fedora-glibc-20090401T0935",
            "cvs/fedora-glibc-20090320T1944",
            "cvs/fedora-glibc-20090310T1925",
            "cvs/fedora-glibc-20090309T1421",
            "cvs/fedora-glibc-20090218T1534",
            "cvs/fedora-glibc-20090204T2135",
            "cvs/fedora-glibc-20090108T1017",
            "cvs/fedora-glibc-20090108T0952",
            "cvs/fedora-glibc-20090102T2110",
            "cvs/fedora-glibc-20090102T2040",
            "cvs/fedora-glibc-20090102T0809",
            "glibc-2.9",
            "cvs/glibc-2_9-base",
            "cvs/glibc-2_9",
            "cvs/fedora-glibc-20081113T2206",
            "cvs/fedora-glibc-20081112T2008",
            "cvs/fedora-glibc-20081031T2102",
            "cvs/fedora-glibc-20081028T1533",
            "cvs/fedora-glibc-20081019T1815",
            "cvs/fedora-glibc-20080828T1623",
            "cvs/fedora-glibc-20080802T0809",
            "cvs/fedora-glibc-20080728T2320",
            "cvs/fedora-glibc-20080716T0944",
            "cvs/fedora-glibc-20080703T1203",
            "cvs/fedora-glibc-20080613T1601",
            "cvs/fedora-glibc-20080612T1619",
            "cvs/fedora-glibc-20080524T2218",
            "cvs/fedora-glibc-20080520T1924",
            "cvs/fedora-glibc-20080518T1017",
            "cvs/fedora-glibc-20080516T2152",
            "cvs/fedora-glibc-20080515T0735",
            "glibc-2.8",
            "cvs/glibc-2_8",
            "cvs/fedora-glibc-20080412T0741",
            "cvs/fedora-glibc-20080411T1934",
            "cvs/fedora-glibc-20080410T1907",
            "cvs/fedora-glibc-20080408T0706",
            "cvs/fedora-glibc-20080328T1347",
            "cvs/fedora-glibc-20080326T1041",
            "cvs/fedora-glibc-20080314T2159",
            "cvs/fedora-glibc-20080314T1732",
            "cvs/fedora-glibc-20080310T1651",
            "cvs/fedora-glibc-20080305T0857",
            "cvs/fedora-glibc-20080216T1726",
            "cvs/fedora-glibc-20080201T1017",
            "cvs/fedora-glibc-20080131T0821",
            "cvs/fedora-glibc-20080111T0737",
            "cvs/fedora-glibc-20080103T1958",
            "cvs/fedora-glibc-20071227T0908",
            "cvs/fedora-glibc-20071212T1953",
            "cvs/fedora-glibc-20071212T1051",
            "glibc-2.7",
            "cvs/glibc-2_7-base",
            "cvs/glibc-2_7",
            "cvs/fedora-glibc-20071017T2029",
            "cvs/fedora-glibc-20071017T2007",
            "cvs/fedora-glibc-20071015T0728",
            "cvs/fedora-glibc-20071014T2102",
            "cvs/fedora-glibc-20071014T1847",
            "cvs/fedora-glibc-20071011T1636",
            "cvs/fedora-glibc-20071010T2047",
            "cvs/fedora-glibc-20071003T1908",
            "cvs/fedora-glibc-20070929T1859",
            "cvs/fedora-glibc-20070920T0007",
            "cvs/fedora-glibc-20070918T1931",
            "cvs/fedora-glibc-20070827T2032",
            "cvs/fedora-glibc-20070825T1839",
            "cvs/fedora-glibc-20070816T2121",
            "cvs/fedora-glibc-20070815T2049",
            "cvs/fedora-glibc-20070814T0725",
            "cvs/fedora-glibc-20070814T0643",
            "cvs/fedora-glibc-20070810T2152",
            "cvs/fedora-glibc-20070809T0939",
            "cvs/fedora-glibc-20070804T2027",
            "cvs/fedora-glibc-20070801T1703",
            "cvs/fedora-glibc-20070731T1624",
            "glibc-2.6.9000",
            "cvs/fedora-glibc-20070515T2025",
            "glibc-2.6",
            "cvs/glibc-2_6-base",
            "cvs/glibc-2_6",
            "cvs/fedora-glibc-20070510T2308",
            "cvs/fedora-glibc-20070510T2304",
            "cvs/fedora-glibc-20070510T0634",
            "cvs/fedora-glibc-20070504T0917",
            "cvs/fedora-glibc-20070416T2350",
            "cvs/fedora-glibc-20070331T1609",
            "cvs/fedora-glibc-20070317T2130",
            "cvs/fedora-glibc-20070221T1011",
            "cvs/fedora-glibc-20070211T1607",
            "cvs/fedora-glibc-20070202T0923",
            "cvs/fedora-glibc-20070117T1043",
            "cvs/fedora-glibc-20070117T0857",
            "cvs/fedora-glibc-20061219T1804",
            "cvs/fedora-glibc-20061214T0850",
            "cvs/fedora-glibc-20061210T1006",
            "cvs/fedora-glibc-20061205T2141",
            "cvs/fedora-glibc-20061201T0821",
            "cvs/fedora-glibc-20061130T1652",
            "cvs/fedora-glibc-20061128T1037",
            "cvs/fedora-glibc-20061120T1000",
            "cvs/fedora-glibc-20061110T2049",
            "cvs/fedora-glibc-20061110T1956",
            "cvs/fedora-glibc-20061109T2048",
            "cvs/fedora-glibc-20061109T1949",
            "cvs/fedora-glibc-20061103T1610",
            "cvs/fedora-glibc-20061029T2155",
            "cvs/fedora-glibc-20061027T1902",
            "cvs/fedora-glibc-20061025T1857",
            "cvs/fedora-glibc-2_5-20061008T1257",
            "cvs/fedora-glibc-2_5-20061008T1253",
            "cvs/glibc-2_5-base",
            "cvs/fedora-glibc-20061002T1858",
            "glibc-2.5",
            "cvs/glibc-2_5",
            "cvs/fedora-glibc-20060929T2037",
            "cvs/fedora-glibc-20060925T1535",
            "cvs/fedora-glibc-20060923T0946",
            "cvs/fedora-glibc-20060919T1847",
            "cvs/fedora-glibc-20060919T1816",
            "cvs/fedora-glibc-20060915T0943",
            "cvs/fedora-glibc-20060910T1832",
            "cvs/fedora-glibc-20060907T0853",
            "cvs/fedora-glibc-20060905T0633",
            "cvs/fedora-glibc-20060831T1812",
            "cvs/fedora-glibc-20060831T0640",
            "cvs/fedora-glibc-20060828T1903",
            "cvs/fedora-glibc-20060825T0639",
            "cvs/fedora-glibc-20060822T0706",
            "cvs/fedora-glibc-20060815T2033",
            "cvs/fedora-glibc-20060815T0533",
            "cvs/fedora-glibc-20060810T0627",
            "cvs/fedora-glibc-20060807T1859",
            "cvs/fedora-glibc-20060802T1808",
            "cvs/fedora-glibc-20060802T1650",
            "cvs/fedora-glibc-20060731T0706",
            "cvs/fedora-glibc-20060729T2255",
            "cvs/fedora-glibc-20060710T2206",
            "cvs/fedora-glibc-20060630T0858",
            "cvs/fedora-glibc-20060531T1322",
            "cvs/fedora-glibc-20060524T0721",
            "cvs/fedora-glibc-20060521T2153",
            "cvs/fedora-glibc-20060519T1550",
            "cvs/fedora-glibc-20060511T1325",
            "cvs/fedora-glibc-20060505T1443",
            "cvs/fedora-glibc-20060505T0554",
            "cvs/fedora-glibc-20060501T0751",
            "cvs/fedora-glibc-20060427T2122",
            "cvs/fedora-glibc-20060426T2000",
            "cvs/fedora-glibc-20060425T0903",
            "cvs/fedora-glibc-20060424T2027",
            "cvs/fedora-glibc-20060424T0820",
            "cvs/fedora-glibc-20060328T0900",
            "glibc-2.4",
            "cvs/glibc-2_4",
            "cvs/fedora-glibc-20060306T1239"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-8058.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.478797904Z",
      "provider": "osv",
      "references": [
        "https://sourceware.org/git/?p=glibc.git;a=commit;h=3ff17af18c38727b88d9115e536c069e6b5d601f",
        "https://www.gnu.org/software/libc/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/8xxx/CVE-2025-8058.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-8058",
        "https://sourceware.org/bugzilla/show_bug.cgi?id=33185",
        "https://sourceware.org/git/?p=glibc.git"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-415"
        ],
        "cna_assigner": "glibc",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/8xxx/CVE-2025-8058.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-8058",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 488646,
  "published_at": "2025-07-23T19:57:17.138+00:00"
}