CVE-2026-40393
High · 8.1CVSS
8.1
EPSS
0.6%
Published
Apr 12, 2026
CISA due date
—
Cloudanix analysis
A graphics software flaw could let a malicious website or application crash or possibly take over software that processes specially crafted graphics content.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This is a memory-corruption vulnerability in Mesa's WebGPU handling. Mesa uses an attacker-controlled or otherwise untrusted value to determine how much data to allocate with stack allocation (`alloca`), then operates on that allocation in a way that can lead to out-of-bounds memory access. Depending on the calling application and graphics driver path, successful exploitation could cause process crashes, memory disclosure, memory corruption, or potentially arbitrary code execution in the context of the process using Mesa/WebGPU. The CVSS rating indicates potential compromise of confidentiality, integrity, and availability, but exploitation is high complexity and no public exploit maturity is currently reported.
Why it matters to the business
Systems and applications that rely on vulnerable Mesa versions for WebGPU or GPU rendering may be exposed to remote crashes or possible code execution if they process attacker-controlled WebGPU workloads. The most likely operational impact is denial of service of browsers, renderers, remote visualization workloads, sandboxed graphics services, or applications that expose GPU functionality. Because Mesa is widely embedded in Linux desktop, workstation, container, browser, virtualization, and graphics stacks, exposure may exist indirectly through dependent software even when Mesa is not deployed as a standalone application. This issue is not currently listed in CISA KEV, is not known to be ransomware-linked, and has a low EPSS score with a flat 30-day trend, so remediation should be prioritized based on whether WebGPU or untrusted rendering workloads are exposed.
How an attack unfolds
An attacker first identifies a target application or service that uses a vulnerable Mesa version and exposes WebGPU or GPU rendering behavior to untrusted input. The attacker then supplies a crafted WebGPU workload, shader, command stream, or related graphics input that influences the size of a stack allocation inside Mesa. Because the allocation size is derived from untrusted data, the crafted input can cause Mesa to allocate an incorrect or unsafe amount of stack memory and then access memory outside the intended bounds. In unsuccessful attempts, this is likely to appear as GPU process crashes, application crashes, renderer resets, or segmentation faults. In a more successful exploitation scenario, the attacker may use the out-of-bounds access to corrupt process memory, disclose sensitive memory, or gain code execution within the privileges and sandbox constraints of the affected application.
How to fix it
Upgrade Mesa to a fixed release. Mesa 25.x deployments should be upgraded to 25.3.6 or later, and Mesa 26.x deployments should be upgraded to 26.0.1 or later. Where Mesa is supplied by an operating system or distribution vendor, apply the vendor-provided security update rather than building manually unless that is the normal maintenance model. Restart affected applications and services after updating because long-running browser, renderer, compositor, container, remote desktop, and graphics processes may continue using the old Mesa libraries until restarted. If immediate patching is not possible, reduce exposure by disabling WebGPU where feasible, preventing untrusted users from submitting GPU/WebGPU workloads, isolating rendering workloads in sandboxes or containers, and limiting network access to services that process graphics content.
How to confirm the fix worked
Confirm installed Mesa package versions are no longer vulnerable: 25.x should be 25.3.6 or later, and 26.x should be 26.0.1 or later. Validate through the operating system package manager, container image manifests, software bills of materials, and runtime library inspection for applications that bundle Mesa. Confirm that long-running processes were restarted after patching by checking their loaded Mesa library paths and start times. For web-facing or remote-rendering applications, verify whether WebGPU is enabled and whether untrusted users can reach that functionality. If WebGPU was disabled as a mitigation, test that the application no longer accepts or executes WebGPU workloads.
Typical attack path
- Identify software that uses vulnerable Mesa versions before 25.3.6 or 26.x before 26.0.1.
- Find an exposed path where attacker-controlled WebGPU or graphics input is processed, such as a browser renderer, remote rendering service, sandboxed graphics worker, or application using Mesa-backed WebGPU.
- Send crafted WebGPU input that manipulates the value Mesa uses to calculate a stack allocation size.
- Trigger out-of-bounds memory access during subsequent handling of the allocated data.
- Cause a denial-of-service crash, or attempt to shape memory corruption for disclosure or code execution in the affected process context.
- If code execution is achieved, continue with sandbox escape, credential access, lateral movement, or persistence depending on the privileges of the compromised process.
How to detect it
There are no known public exploit indicators, named threat actors, KEV activity, or ransomware campaigns associated with this vulnerability. Detection should focus on retrospective evidence of suspicious crashes or memory-corruption behavior in applications using Mesa/WebGPU. Review system journals, application logs, browser crash reports, GPU process logs, compositor logs, container logs, core dumps, and endpoint detection telemetry for segmentation faults, stack overflows, aborts, renderer resets, or repeated crashes involving Mesa libraries shortly after processing untrusted WebGPU or graphics content. On Linux systems, useful sources include `journalctl`, kernel logs, apport/ABRT crash reports, browser crash directories, systemd-coredump metadata, container runtime logs, and EDR process-crash events. Investigate repeated crashes in processes that load Mesa libraries such as `libEGL_mesa`, `libGLX_mesa`, `libgbm`, `libgallium`, or Mesa DRI drivers, especially when correlated with external requests, newly accessed web content, unusual shader/WebGPU activity, or attacker-controlled input. Absence of crashes does not prove absence of exploitation because successful memory corruption may not generate obvious logs.
What your security team should do
- Inventory Linux desktops, workstations, containers, VDI hosts, remote rendering services, browser stacks, and applications that include or dynamically link Mesa.
- Prioritize patching systems that expose WebGPU or graphics rendering to untrusted remote input, multi-user workloads, browsers, or internet-accessible services.
- Upgrade Mesa to 25.3.6, 26.0.1, or later through trusted vendor packages and rebuild container images or application bundles that include vulnerable Mesa libraries.
- Restart affected workloads after patching, including browsers, compositors, GPU services, remote desktop services, containers, and rendering workers.
- Where patching is delayed, disable WebGPU or restrict untrusted GPU workload submission until updates are deployed.
- Monitor for abnormal renderer, GPU-process, browser, compositor, or graphics-service crashes that could indicate attempted exploitation.
- Because there is no KEV listing, no known ransomware association, low EPSS, and no public exploit maturity, treat this as important but prioritize highest where WebGPU is exposed to untrusted input.
The record
In Mesa before 25.3.6 and 26 before 26.0.1, out-of-bounds memory access can occur in WebGPU because the amount of to-be-allocated data depends on an untrusted party, and is then used for alloca.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787
- CVE-2026-89085 A flaw was found in parted. CWE-787
- CVE-2026-85746 MariaDB server is a community developed fork of MySQL server. CWE-787
- CVE-2026-107815 MariaDB server is a community developed fork of MySQL server. CWE-787
- CVE-2026-56851 The Nickname profile can panic with an out-of-bounds slice error when transforming… CWE-787