A stack-based buffer overflow flaw was found in the X.Org X server and Xwayland. The X server has multiple stack buffers sized XkbMaxShiftLevel * XkbNumKbdGroups but CheckKeyTypes() does not verify or clamp non-canonical key types to XkbMaxShiftLevel. A client can change key types to excessive shift levels and trigger stack overflows. This is caused by an incomplete fix of CVE-2025-26597. This may be used to crash the server, or for privilege escalation if the X server runs as root.
{
"cwe_ids": [
"CWE-121"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50258.json",
"cna_assigner": "redhat"
}{
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "21.1.23"
},
{
"fixed": "24.1.12"
},
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"cpe": [
"cpe:2.3:a:x.org:x_server:*:*:*:*:*:*:*:*",
"cpe:2.3:a:x.org:xwayland:*:*:*:*:*:*:*:*",
"cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*"
],
"source": [
"CPE_RANGE",
"CPE_STRING",
"REFERENCES"
]
}[
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"300610838174649088870011561480334954400",
"139204243002080387561271325927140555814",
"244331644946721174751841906403275508494",
"270921011548502308155737909051683454974"
],
"threshold": 0.9
},
"source": "https://gitlab.freedesktop.org/xorg/xserver@543e108516428fc8c3bea91d6563ad266f9a801e",
"id": "CVE-2026-50258-2be6445d",
"target": {
"file": "xkb/xkb.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 3684.0,
"function_hash": "207369876806876076812300766667042293307"
},
"source": "https://gitlab.freedesktop.org/xorg/xserver@543e108516428fc8c3bea91d6563ad266f9a801e",
"id": "CVE-2026-50258-3997eb36",
"target": {
"function": "CheckKeyTypes",
"file": "xkb/xkb.c"
}
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-50258.json"
"2026-07-16T08:27:59Z"