CVE-2026-56000
Executive Summary
CVE-2026-56000 is a critical heap use-after-free vulnerability in the X.Org X server and XWayland components. The flaw resides in the CommonMakeCurrent() function within the GLX extension, where a pointer into a dynamically allocated buffer can become dangling after a reallocation operation. A local attacker with an authenticated X connection can trigger this condition by providing a crafted GLX commit, leading to arbitrary code execution or denial of service. The vulnerability affects xorg-server versions before 21.2.24 and xwayland versions before 24.1.13. No public proof-of-concept or exploit code is currently available, but the technical details are sufficient for advanced threat actors to develop weaponized exploits.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not in a package manager ecosystem (NPM, PyPI, Go, Ruby). It affects the X.Org display server, which is a core component of most Linux distributions. The supply chain risk is moderate, as the vulnerable component is widely distributed through operating system package repositories. Organizations should verify their package versions and apply vendor patches promptly.
CVSS Breakdown & Threat Level
- CVSS Score: 7.8 (High)
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Local (AV:L) – requires local access to the system.
- Attack Complexity: Low (AC:L) – no special conditions beyond a valid X connection.
- Privileges Required: Low (PR:L) – attacker needs a user account with X session access.
- User Interaction: None (UI:N) – no user action required beyond the attacker’s own.
- Scope: Unchanged (S:U) – vulnerability does not cross security boundaries.
- Confidentiality Impact: High (C:H) – potential memory disclosure.
- Integrity Impact: High (I:H) – arbitrary code execution possible.
- Availability Impact: High (A:H) – crash or denial of service.
Threat Level: High. The vulnerability is locally exploitable with low privileges and can lead to full system compromise. The lack of public exploits reduces immediate risk, but the technical details are clear enough for targeted attacks.
Deep Dive & Mechanics
The vulnerability is a classic heap use-after-free (UAF) in the GLX extension of the X server. The CommonMakeCurrent() function is responsible for setting the current GLX context for a given drawable. During this process, it accesses a pointer that references memory allocated on the heap. If the attacker sends a GLX commit request that triggers a reallocation of the underlying buffer (e.g., by changing the drawable size or context attributes), the original pointer becomes stale. Subsequent use of this dangling pointer in CommonMakeCurrent() results in a use-after-free condition.
The root cause is the lack of proper synchronization or pointer invalidation when the memory backing the GLX context is reallocated. The X server does not update the pointer held by CommonMakeCurrent() after a reallocation event, allowing the attacker to control the freed memory and potentially execute arbitrary code.
Attack Flow:
- Attacker establishes an authenticated X connection (e.g., via SSH with X11 forwarding or local session).
- Attacker creates a GLX context and drawable.
- Attacker sends a GLX commit request that triggers a reallocation of the context’s backing memory.
- The
CommonMakeCurrent()function is called, using the stale pointer. - The attacker can manipulate the freed heap memory (e.g., via heap spraying) to achieve code execution.
Vulnerable vs. Patched Code
The vulnerable code path is in glx/glxcmds.c (or similar) in the CommonMakeCurrent() function. The patched version ensures that after any reallocation, the pointer used by CommonMakeCurrent() is updated or the function is re-invoked with the correct pointer.
Vulnerable Code (simplified):
static void CommonMakeCurrent(GLXContext *ctx) {
// ctx->drawable->buffer is a heap pointer
void *buffer = ctx->drawable->buffer;
// ... use buffer ...
// If reallocation happens here, buffer becomes stale
process_buffer(buffer);
}
Patched Code (simplified):
static void CommonMakeCurrent(GLXContext *ctx) {
// Re-fetch the pointer after potential reallocation
void *buffer = ctx->drawable->buffer;
// Ensure buffer is valid
if (!buffer) return;
// ... use buffer ...
process_buffer(buffer);
}
The patch adds a re-fetch of the buffer pointer and a null check to prevent use of stale memory. The exact patch details are not publicly available, but the fix is included in versions 21.2.24 and 24.1.13.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Local user account with X session access.
- Target system running vulnerable xorg-server (< 21.2.24) or xwayland (< 24.1.13).
- GLX extension enabled (default on most systems).
Exploitation Steps:
- Establish X Connection: Use
ssh -Xor a local terminal. - Create GLX Context: Use the GLX API to create a context and drawable.
- Trigger Reallocation: Send a GLX commit that changes the drawable size or context attributes, causing heap reallocation.
- Heap Spray: Allocate controlled data in the freed memory region to overwrite function pointers or return addresses.
- Trigger UAF: Call
CommonMakeCurrent()again to use the dangling pointer, executing the attacker’s payload.
Example Code (Conceptual):
#include <GL/glx.h>
#include <X11/Xlib.h>
int main() {
Display *dpy = XOpenDisplay(NULL);
if (!dpy) return 1;
int screen = DefaultScreen(dpy);
Window win = XCreateSimpleWindow(dpy, RootWindow(dpy, screen), 0, 0, 100, 100, 0, 0, 0);
GLXContext ctx = glXCreateContext(dpy, NULL, NULL, True);
glXMakeCurrent(dpy, win, ctx);
// Trigger reallocation
XResizeWindow(dpy, win, 200, 200);
// Heap spray and trigger UAF
// ... exploit code ...
return 0;
}
Note: No public exploit code is available. The above is a conceptual outline.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual GLX API calls, especially
glXMakeCurrentwith rapidly changing drawable sizes. - Use eBPF or auditd to track heap operations in the X server process.
- Enable address sanitizer (ASAN) on development systems to catch UAF early.
Mitigation:
- Apply vendor patches immediately.
- Restrict local user access to the X server (e.g., disable X11 forwarding for untrusted users).
- Use SELinux or AppArmor to confine the X server process.
Indicators of Compromise (IOCs)
- Process: Xorg or Xwayland process crash with SIGSEGV or SIGABRT.
- Logs: Xorg.0.log entries containing "GLX: failed to make context current" or similar errors.
- Memory: Heap corruption patterns in the X server’s memory space.
- Network: Unusual X11 traffic on port 6000 (if remote).
- File: Core dumps from Xorg or Xwayland.
Detection Engineering
YARA Rule
The full machine-readable detection artifact (Sigma, YARA, Suricata, Elastic, Splunk or Wazuh rule body) is available through the ValtersIT API — moved there in response to large-scale automated scraping, to keep this independently-researched intelligence sustainable. The written analysis on every record remains fully open.
[ GET API ACCESS ] →Sigma Rule
The full machine-readable detection artifact (Sigma, YARA, Suricata, Elastic, Splunk or Wazuh rule body) is available through the ValtersIT API — moved there in response to large-scale automated scraping, to keep this independently-researched intelligence sustainable. The written analysis on every record remains fully open.
[ GET API ACCESS ] →Suricata Rule
The full machine-readable detection artifact (Sigma, YARA, Suricata, Elastic, Splunk or Wazuh rule body) is available through the ValtersIT API — moved there in response to large-scale automated scraping, to keep this independently-researched intelligence sustainable. The written analysis on every record remains fully open.
[ GET API ACCESS ] →Remediation & Mitigation
Immediate Actions:
- Upgrade xorg-server to version 21.2.24 or later.
- Upgrade xwayland to version 24.1.13 or later.
- If patching is not possible, disable GLX extension by adding
-extension GLXto the X server command line (may break graphical applications).
Long-Term Measures:
- Implement memory safety checks in the X server (e.g., use of smart pointers or reference counting).
- Regularly audit and fuzz the GLX extension code.
- Restrict local user privileges and use sandboxing for X11 applications.
Workarounds:
- Use Wayland instead of X11 where possible.
- Disable X11 forwarding in SSH (
X11Forwarding noin sshd_config).
Valters IT
Securing Digital Frontiers