CVE-2026-40200 Memory corruption in musl

High 8.1 Published Updated

Stack-based memory corruption in musl libc qsort allows code execution or denial of service when sorting extremely large arrays.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40200?

CVE-2026-40200 is a high-severity memory corruption vulnerability in musl-libc musl, published on 10 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

An issue was discovered in musl libc 0.7.10 through 1.2.6. Stack-based memory corruption can occur during qsort of very large arrays, due to incorrectly implemented double-word primitives. The number of elements must exceed about seven million, i.e., the 32nd Leonardo number on 32-bit platforms (or the 64th Leonardo number on 64-bit platforms, which is not practical).

Weakness: CWE-670

Which versions are affected by CVE-2026-40200?

How do I fix CVE-2026-40200?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-40200 being exploited?

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

Sources

Also known as ALPINE-CVE-2026-40200, BELL-CVE-2026-40200, DEBIAN-CVE-2026-40200, ECHO-44b5-f48b-3822, GHSA-qrwv-475h-2439, ROOT-OS-ALPINE-315-CVE-2026-40200 and 3 more.

Is CVE-2026-40200 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free