{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": [
              "cpe:2.3:a:gnome:glib:*:*:*:*:*:*:*:*",
              "cpe:2.3:a:gnome:glib:2.88.0:*:*:*:*:*:*:*"
            ],
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.86.5"
              },
              {
                "introduced": "2.88.0"
              },
              {
                "last_affected": "2.88.0"
              }
            ],
            "source": [
              "CPE_RANGE",
              "CPE_STRING"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3033f7862c2d3c7569cef2ad4b425cf42e95d4b4"
            },
            {
              "introduced": "7a03e2ef692204d8bf0fa5f2b1a32bbac14634f4"
            },
            {
              "last_affected": "7a03e2ef692204d8bf0fa5f2b1a32bbac14634f4"
            }
          ],
          "repo": "https://github.com/gnome/glib",
          "type": "GIT"
        },
        {
          "database_specific": {
            "cpe": [
              "cpe:2.3:a:gnome:glib:*:*:*:*:*:*:*:*",
              "cpe:2.3:a:gnome:glib:2.88.0:*:*:*:*:*:*:*"
            ],
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.86.5"
              },
              {
                "introduced": "2.88.0"
              },
              {
                "last_affected": "2.88.0"
              }
            ],
            "source": [
              "CPE_RANGE",
              "CPE_STRING"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3033f7862c2d3c7569cef2ad4b425cf42e95d4b4"
            },
            {
              "introduced": "7a03e2ef692204d8bf0fa5f2b1a32bbac14634f4"
            },
            {
              "last_affected": "7a03e2ef692204d8bf0fa5f2b1a32bbac14634f4"
            }
          ],
          "repo": "https://gitlab.gnome.org/gnome/glib",
          "type": "GIT"
        }
      ],
      "versions": [
        "2.88.0"
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "redhat",
    "cwe_ids": [
      "CWE-126"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58012.json"
  },
  "details": "A flaw was found in GLib. A buffer over-read can occur in the g_regex_replace function when used with the `G_REGEX_RAW` compile flag and case-change replacement escapes because the string_append function processes matched substrings using UTF-8 functions that assume valid UTF-8 input, even when the string is treated as raw bytes. This vulnerability can cause a minor information disclosure of 1-5 bytes and a denial of service when the buffer over-read crosses a page boundary.",
  "id": "CVE-2026-58012",
  "modified": "2026-08-07T11:31:34.485602092Z",
  "published": "2026-06-30T12:57:21.859Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://access.redhat.com/downloads/content/package-browser/"
    },
    {
      "type": "ADVISORY",
      "url": "https://access.redhat.com/errata/RHSA-2026:49512"
    },
    {
      "type": "ADVISORY",
      "url": "https://access.redhat.com/security/cve/CVE-2026-58012"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58012.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58012"
    },
    {
      "type": "REPORT",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2492247"
    },
    {
      "type": "REPORT",
      "url": "https://gitlab.gnome.org/GNOME/glib/-/issues/3918"
    },
    {
      "type": "PACKAGE",
      "url": "https://gitlab.gnome.org/GNOME/glib/"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Glib: buffer over-read in g_regex_replace() via glib/gregex.c:string_append() and g_utf8_next_char()"
}