# CVE-2026-40393: Memory corruption in Mesa

> Out-of-bounds memory access in Mesa's WebGPU implementation allows attackers to cause crashes or execute arbitrary code via untrusted data sizes.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Apr 2026
- **Updated:** 13 Jul 2026
- **Also known as:** AZL-82688, BELL-CVE-2026-40393, CLSA-2026-1787314086, DEBIAN-CVE-2026-40393, ECHO-970d-b2f9-098e, GHSA-w54f-pw7x-c532, OESA-2026-2048, OESA-2026-2049, OESA-2026-2050, OESA-2026-2051, OESA-2026-2052, SUSE-SU-2026:1343-1, SUSE-SU-2026:1835-1, SUSE-SU-2026:1839-1, SUSE-SU-2026:1844-1, SUSE-SU-2026:1845-1, SUSE-SU-2026:21292-1, SUSE-SU-2026:21412-1, SUSE-SU-2026:21534-1, SUSE-SU-2026:21564-1, UBUNTU-CVE-2026-40393, USN-8427-1, openSUSE-SU-2026:20688-1

## What is CVE-2026-40393?

CVE-2026-40393 is a high-severity memory corruption vulnerability in mesa3d Mesa, published on 12 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2026-40393?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Mesa` | SUSE:Linux Enterprise Micro 5.2 | All versions | 20.2.4-150300.59.12.1 |

Products: Mesa3d Mesa.

## How do I fix CVE-2026-40393?

Upgrade to a fixed version.

## Is CVE-2026-40393 being exploited?

There is no known exploitation of CVE-2026-40393 in the wild and no public exploit code.

## Other vulnerabilities in mesa3d Mesa

- [CVE-2023-45931](https://insights.sbomify.com/CVE-2023-45931/): Null dereference in n/a (high 7.5)
- [CVE-2013-1993](https://insights.sbomify.com/CVE-2013-1993/): Integer overflow in n/a (medium 6.8)
- [CVE-2023-45913](https://insights.sbomify.com/CVE-2023-45913/): Null dereference in n/a (medium 6.2)
- [CVE-2023-45919](https://insights.sbomify.com/CVE-2023-45919/): Memory corruption in n/a (medium 5.3)
- [CVE-2023-45922](https://insights.sbomify.com/CVE-2023-45922/): Null dereference in n/a (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40393 and fix it if it is affected.

What it is: CVE-2026-40393 is a high-severity memory corruption vulnerability in mesa3d Mesa, published on 12 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40393 in the wild and no public exploit code.

Affected product: mesa3d Mesa. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40393/ (Markdown: https://insights.sbomify.com/CVE-2026-40393/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40393
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40393
- OSV: https://osv.dev/vulnerability/CVE-2026-40393

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40393/
Summaries are generated and may contain mistakes; the official description above is the record.
