# CVE-2026-93520: X.org X server heap buffer overflow in XkbAllocNames

Source: https://junglewise.ai/threats/cve-2026-93520-a-heap-buffer-overflow-caused-by-mismatching-size-calculations  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-28. Updated: 2026-10-28  
License: CC BY 4.0 with a link back

CVE-2026-93520 · Severity: high · CVSS 7.8 · Published 2026-10-28

X.org X server manages graphical displays for Unix-like systems and is commonly used in Linux desktops. An authenticated user on the local display server can exploit a heap buffer overflow to crash the X server or potentially run malicious code with server privileges, disrupting the graphical environment or compromising the system.

Technologies: [X.Org X Server](https://junglewise.ai/threats/technologies/x-org-x-server), [X.Org XWayland](https://junglewise.ai/threats/technologies/x-org-xwayland). Vendors: [X.Org](https://junglewise.ai/threats/vendors/x-org).

## Quick answers

**Is CVE-2026-93520 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-93520 being exploited in the wild.

**How severe is CVE-2026-93520?** High severity, with a CVSS score of 7.8, published 28 October 2026.

**Which products and versions are affected?** X.Org X Server before 2.1.25; X.Org XWayland before 24.1.14.

**Is there a fix for CVE-2026-93520?** Yes: fixed in X server 2.1.25, XWayland 24.1.14. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-93520 attacked?** It is attacked with local access, in an operating system.

**Am I affected by CVE-2026-93520?** Check whether you run X.Org X Server or X.Org XWayland at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in X server 2.1.25, XWayland 24.1.14

## Technical details

The vulnerability is a heap buffer overflow caused by inconsistent size calculations between XkbAllocNames() and XkbChangeKeycodeRange(). XkbAllocNames() allocates names->keys based on max_key_code+1, but after a prior fix, XkbChangeKeycodeRange() assumes MAP_LENGTH (256) and memsets beyond the actual allocation when max_key_code is smaller. An authenticated X client can trigger this by loading a keymap with small max_key_code then issuing a SetMap request to extend maxKeyCode to 255, causing out-of-bounds memory writes.

## Affected products

- X.org X server before 2.1.25
- X.org XWayland before 24.1.14

## Timeline

- 2026-10-28: disclosed: CVE published on NVD
- 2026-08-26: patched: Fix committed to xserver repository

## References

- [https://gitlab.freedesktop.org/xorg/xserver/-/commit/b941a473e06f26a407a9adb15759be79f7418e86](https://gitlab.freedesktop.org/xorg/xserver/-/commit/b941a473e06f26a407a9adb15759be79f7418e86)

## Related threats

- [X.Org X Server use after free in gesture sprite lifecycle](https://junglewise.ai/threats/cve-2026-93536-a-use-after-free-caused-by-missing-lifecycle-management-of)
- [X.Org X Server buffer overread in CheckKeySyms](https://junglewise.ai/threats/cve-2026-93524-a-buffer-overread-in-checkkeysyms-in-x-org-x-server-before-21-1)
- [X.Org X Server heap buffer overflow in XIPassiveUngrabDevice](https://junglewise.ai/threats/cve-2026-93523-a-heap-buffer-overflow-caused-by-a-xipassiveungrabdevice-request)
- [X.Org X Server heap buffer overflow in CopyArea CPU-to-FBO](https://junglewise.ai/threats/cve-2026-93522-a-heap-buffer-overflow-caused-by-mismatched-size-usage-in)
- [X.Org X Server buffer overflow in RandR ChangeProviderProperty](https://junglewise.ai/threats/cve-2026-93521-a-buffer-overflow-in-randr-changeproviderproperty-requests-in-x)
