Security Resilience

CVE-2024-42479

Memory Safety in Ggml Llama.Cpp ≤ b3561

Public PoCMemory Safety
Published
12 August 2024
Modified
27 April 2026
Patch / advisory
CVSS Score v3.1 10.0
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Score 0.026 86th percentile
Risk Priority 81 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-42479 is a critical-severity Write-what-where Condition (CWE-123) vulnerability in Ggml Llama.Cpp. Its CVSS base score is 10.0 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 14% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as NLP and Transformers; in the Other ATLAS/OWASP Terms risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-16 (Memory Protection) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

llama.cpp, a C/C++ library providing LLM inference, is affected by CVE-2024-42479, a flaw in the rpc_tensor structure. The unsafe data pointer member permits arbitrary address writing, corresponding to CWE-123 and CWE-787, and carries a CVSS 3.1 score of 10.0 reflecting network-reachable impact with high consequences for confidentiality, integrity, and availability plus scope change.

An unauthenticated remote attacker can supply crafted RPC data to trigger the write primitive, achieving arbitrary memory modification that may lead to code execution or full host compromise in affected deployments.

The issue is resolved in commit b3561, per the associated GitHub security advisory GHSA-wcr5-566p-9cwj, which directs users to apply the patch.

EPSS remains low at a current value of 0.0568 with a peak of 0.0586 and shows no material rise; the vulnerability is relevant to AI/ML environments that expose llama.cpp RPC interfaces for distributed inference.

EU & UK References

Vulnerability Data

llama.cpp provides LLM inference in C/C++. The unsafe `data` pointer member in the `rpc_tensor` structure can cause arbitrary address writing. This vulnerability is fixed in b3561.

CWE(s)

AI Security AnalysisAI

AI Category
NLP and Transformers
Risk Domain
Other ATLAS/OWASP Terms
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
llama.cpp is a C/C++ library specifically for LLM (Large Language Model) inference, which relies on transformer architectures central to NLP tasks.

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-23496Same product: Ggml Llama.Cpp
CVE-2024-21825Same product: Ggml Llama.Cpp
CVE-2024-21836Same product: Ggml Llama.Cpp
CVE-2024-23605Same product: Ggml Llama.Cpp
CVE-2024-21802Same product: Ggml Llama.Cpp
CVE-2026-43500Shared CWE-123, CWE-787
CVE-2024-20741Shared CWE-123, CWE-787
CVE-2024-20141Shared CWE-123, CWE-787
CVE-2025-22225Shared CWE-123, CWE-787
CVE-2024-47438Shared CWE-123, CWE-787

Affected Assets

ggml
llama.cpp
≤ b3561

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 3 hardening rules · 3 OS baselines
Validate
Prove the fix (OWASP ASVS)

—

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing and evaluation (including fuzzing and bounds checks) finds out-of-bounds write flaws before deployment.

Memory-protection mechanisms block unauthorized writes to arbitrary locations even if a write-what-where primitive exists.

Requiring documented secure-development standards and tools can mandate bounds-checked coding practices that avoid the weakness.

Secure engineering principles require memory-safe coding and bounds checking that eliminate the root cause of write-what-where flaws.

Process isolation confines the blast radius of an arbitrary write so it cannot affect other domains.

Input validation directly stops malformed data from triggering buffer overflows that produce arbitrary write-what-where conditions.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly prevent arbitrary write conditions via safe coding, bounds checking, and memory-safe constructs.

ID.RA-01 partial match
blocks

Vulnerability scanning and recording can discover out-of-bounds write flaws so they can be remediated.

PR.PS-02 partial match
blocks

Patching or replacing vulnerable software directly eliminates known instances of this coding weakness.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development and acceptance can detect write-what-where conditions before deployment.

prevents

Training developers in secure coding practices (bounds checking, safe memory handling) reduces some out-of-bounds write instances, but the defect requires deep technical knowledge and even trained developers make these mistakes, so only a minority of instances are prevented.

prevents

Secure coding standards explicitly forbid unsafe buffer operations that enable arbitrary memory writes.

prevents

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary software implementation weaknesses in delivered code the way those practices do; CWE-123 is a regular software CWE arising from buffer overflows and integer overflows at implementation, and the clause reaches it at the same `partial` rung as CWE-134, with a declared ceiling of `partial` on this verb.

finds

A.8.8's reach is DISCLOSURE — it sees only instances that carry a vendor-published flaw, and write-what-where conditions do commonly surface as CVEs (memory corruption is widely disclosed), so the disclosed share is a minority of the class but a real one.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over our cross-walk; rows rated `none` are excluded, and each rule says how its mapping was checked.

Definition changed on 29 October 2026. Until then this section listed every rule rated above none, partial included. From that date it lists rules whose mapping is rated full or mostly and checked at llm_unverified or higher; partial mappings show when you ask.

No rule maps to these weaknesses at full or mostly. Tick the option above to see the partial mappings.

Oracle Linux 8 (1 partial rule)
  • V-248592 OL 8 must clear memory when it is freed to prevent use-after-free attacks. blocks CWE-123
RHEL 8 (1 partial rule)
  • V-230279 RHEL 8 must clear memory when it is freed to prevent use-after-free attacks. blocks CWE-123
Windows 10 (1 partial rule)
  • V-220727 Structured Exception Handling Overwrite Protection (SEHOP) must be enabled. blocks CWE-123

References