Junglewise Threat Intelligence

CVE-2026-50259: X.Org X server stack buffer overflow in XKB SetMap request

CVE-2026-50259 · Severity: high · CVSS 7.8 · Published 2026-06-05

Technologies: X.Org Foundation X Server, X.Org Foundation Xwayland. Vendors: X.Org Foundation, X.Org.

Executive brief

A security vulnerability has been identified in the X.Org X server and Xwayland, components responsible for managing graphical displays on Linux and Unix-like systems. An attacker with local access to a system can exploit this flaw to crash the display server or potentially gain administrative (root) privileges. This could lead to a full system takeover or a denial of service for all users on the affected machine.

Technical details

A stack-based buffer overflow exists in the _XkbSetMapChecks() function within the X.Org X server and Xwayland. The function declares a fixed-size stack buffer, mapWidths[256], which is indexed by a key type index. A helper function, CheckKeyTypes(), fails to properly validate or clamp the 'nMaps' value (derived from client-controlled 'firstType' and 'nTypes' fields) when the XkbSetMapResizeTypes flag is set. By sending specifically crafted SetMap requests, a local attacker can bypass index checks and write past the buffer boundaries into adjacent stack variables. This can result in a server crash or arbitrary code execution with the privileges of the X server (often root). The issue is fixed in xorg-server 21.1.23 and xwayland 24.1.12.

Affected products

  • X.Org X server <= 21.1.22
  • X.Org Xwayland <= 24.1.9

Timeline

  • 2026-04-20: patched: Upstream fix committed to GitLab
  • 2026-06-02: advisory: X.Org Security Advisory released
  • 2026-06-05: disclosed: CVE published and NVD record created

References

Related threats