{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-58012",
        "assignerOrgId": "53f830b8-0a3f-465b-8143-3b8a9948e749",
        "state": "PUBLISHED",
        "assignerShortName": "redhat",
        "dateReserved": "2026-06-26T20:59:47.855Z",
        "datePublished": "2026-06-30T12:57:21.859Z",
        "dateUpdated": "2026-09-01T02:20:35.686Z"
    },
    "containers": {
        "cna": {
            "title": "Glib: buffer over-read in g_regex_replace() via glib/gregex.c:string_append() and g_utf8_next_char()",
            "metrics": [
                {
                    "other": {
                        "content": {
                            "value": "Moderate",
                            "namespace": "https://access.redhat.com/security/updates/classification/"
                        },
                        "type": "Red Hat severity rating"
                    }
                },
                {
                    "cvssV3_1": {
                        "attackComplexity": "LOW",
                        "attackVector": "NETWORK",
                        "availabilityImpact": "LOW",
                        "baseScore": 6.5,
                        "baseSeverity": "MEDIUM",
                        "confidentialityImpact": "LOW",
                        "integrityImpact": "NONE",
                        "privilegesRequired": "NONE",
                        "scope": "UNCHANGED",
                        "userInteraction": "NONE",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
                        "version": "3.1"
                    },
                    "format": "CVSS"
                }
            ],
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "affected": [
                {
                    "vendor": "GNOME",
                    "product": "GLib",
                    "versions": [
                        {
                            "status": "affected",
                            "version": "0",
                            "lessThan": "2.86.5",
                            "versionType": "semver"
                        },
                        {
                            "status": "affected",
                            "version": "0",
                            "lessThan": "2.88.1",
                            "versionType": "semver"
                        }
                    ],
                    "packageName": "GLib",
                    "collectionURL": "https://gitlab.gnome.org/GNOME/glib/",
                    "defaultStatus": "unaffected"
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 10",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "0:2.80.4-12.el10_2.21",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/o:redhat:enterprise_linux:10.2"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 8",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "mingw-glib2",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "0:2.70.1-9.el8_10",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:enterprise_linux:8::crb"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 8",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "0:2.56.4-177.el8_10",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:enterprise_linux:8::crb",
                        "cpe:/o:redhat:enterprise_linux:8::baseos"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 9",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "0:2.68.4-19.el9_8.9",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:enterprise_linux:9::appstream",
                        "cpe:/a:redhat:enterprise_linux:9::crb",
                        "cpe:/o:redhat:enterprise_linux:9::baseos"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 9",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "0:2.68.4-19.el9_8.9",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:enterprise_linux:9::appstream",
                        "cpe:/a:redhat:enterprise_linux:9::crb",
                        "cpe:/o:redhat:enterprise_linux:9::baseos"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Discovery 2",
                    "collectionURL": "https://catalog.redhat.com/software/containers/",
                    "packageName": "discovery/discovery-server-rhel9",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "1788205779",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:discovery:2::el9"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Discovery 2",
                    "collectionURL": "https://catalog.redhat.com/software/containers/",
                    "packageName": "discovery/discovery-ui-rhel9",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "1788206196",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:discovery:2::el9"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Update Infrastructure 5",
                    "collectionURL": "https://catalog.redhat.com/software/containers/",
                    "packageName": "rhui5/cds-kubernetes-tp-rhel9",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "1787241211",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:rhui:5::el9"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Update Infrastructure 5",
                    "collectionURL": "https://catalog.redhat.com/software/containers/",
                    "packageName": "rhui5/installer-tp-rhel9",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "1787135742",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:rhui:5::el9"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Update Infrastructure 5",
                    "collectionURL": "https://catalog.redhat.com/software/containers/",
                    "packageName": "rhui5/rhua-tp-rhel9",
                    "defaultStatus": "affected",
                    "versions": [
                        {
                            "version": "1787241260",
                            "lessThan": "*",
                            "versionType": "rpm",
                            "status": "unaffected"
                        }
                    ],
                    "cpes": [
                        "cpe:/a:redhat:rhui:5::el9"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 10",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "mingw-glib2",
                    "defaultStatus": "affected",
                    "cpes": [
                        "cpe:/o:redhat:enterprise_linux:10"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 6",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "affected",
                    "cpes": [
                        "cpe:/o:redhat:enterprise_linux:6"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 7",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "affected",
                    "cpes": [
                        "cpe:/o:redhat:enterprise_linux:7"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Enterprise Linux 9",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "mingw-glib2",
                    "defaultStatus": "affected",
                    "cpes": [
                        "cpe:/o:redhat:enterprise_linux:9"
                    ]
                },
                {
                    "vendor": "Red Hat",
                    "product": "Red Hat Hardened Images",
                    "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                    "packageName": "glib2",
                    "defaultStatus": "unaffected",
                    "cpes": [
                        "cpe:/a:redhat:hummingbird:1"
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://access.redhat.com/errata/RHSA-2026:49512",
                    "name": "RHSA-2026:49512",
                    "tags": [
                        "vendor-advisory",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://access.redhat.com/errata/RHSA-2026:55440",
                    "name": "RHSA-2026:55440",
                    "tags": [
                        "vendor-advisory",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://access.redhat.com/errata/RHSA-2026:57015",
                    "name": "RHSA-2026:57015",
                    "tags": [
                        "vendor-advisory",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://access.redhat.com/errata/RHSA-2026:58981",
                    "name": "RHSA-2026:58981",
                    "tags": [
                        "vendor-advisory",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://access.redhat.com/errata/RHSA-2026:61766",
                    "name": "RHSA-2026:61766",
                    "tags": [
                        "vendor-advisory",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://access.redhat.com/errata/RHSA-2026:61783",
                    "name": "RHSA-2026:61783",
                    "tags": [
                        "vendor-advisory",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://access.redhat.com/security/cve/CVE-2026-58012",
                    "tags": [
                        "vdb-entry",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2492247",
                    "name": "RHBZ#2492247",
                    "tags": [
                        "issue-tracking",
                        "x_refsource_REDHAT"
                    ]
                },
                {
                    "url": "https://gitlab.gnome.org/GNOME/glib/-/issues/3918"
                }
            ],
            "datePublic": "2026-03-27T00:00:00.000Z",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-126",
                            "description": "Buffer Over-read",
                            "lang": "en",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "x_redhatCweChain": "CWE-126: Buffer Over-read",
            "workarounds": [
                {
                    "lang": "en",
                    "value": "To mitigate this vulnerability, implement strict input validation to sanitize user-supplied replacement strings, specifically rejecting or escaping case-change modifiers (\\u, \\l, \\U, \\L) before calling g_regex_replace() or g_regex_replace_eval() when the G_REGEX_RAW compile flag is used. Removing the G_REGEX_RAW flag or hardcoding the replacement strings will completely neutralize this issue."
                }
            ],
            "timeline": [
                {
                    "lang": "en",
                    "time": "2026-06-24T16:40:58.048Z",
                    "value": "Reported to Red Hat."
                },
                {
                    "lang": "en",
                    "time": "2026-03-27T00:00:00.000Z",
                    "value": "Made public."
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Red Hat would like to thank linhlhq for reporting this issue."
                }
            ],
            "providerMetadata": {
                "orgId": "53f830b8-0a3f-465b-8143-3b8a9948e749",
                "shortName": "redhat",
                "dateUpdated": "2026-09-01T02:20:35.686Z"
            },
            "x_generator": {
                "engine": "cvelib 1.8.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-06-30T13:17:40.887957Z",
                                "id": "CVE-2026-58012",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "yes"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-06-30T13:18:19.247Z"
                }
            }
        ]
    }
}