CVE-2024-21802 Memory corruption in llama.cpp

High 8.8 Published Updated

A heap-based buffer overflow in llama.cpp allows attackers to execute arbitrary code via a specially crafted GGUF file.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2024-21802?

CVE-2024-21802 is a high-severity memory corruption vulnerability in llama.cpp, published on 26 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A heap-based buffer overflow vulnerability exists in the GGUF library info->ne functionality of llama.cpp Commit 18c2e17. A specially crafted .gguf file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.

Weakness: CWE-787, CWE-122

Which versions are affected by CVE-2024-21802?

It affects 1 product.

Products include Ggml Llama.cpp.

How do I fix CVE-2024-21802?

No fix has been published for CVE-2024-21802 yet. Limit exposure of the affected software until one is available.

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

Is CVE-2024-21802 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21802 exists.

Sources

Also known as GHSA-gwh5-fh5x-ww83.

Is CVE-2024-21802 in your software?

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

Check your SBOMs for free