Heap memory corruption via tensor-size integer overflow
Published Jul 10, 2025 · Updated Jul 10, 2025
Heap buffer overflow in ggml-org llama.cpp before commit 26a48ad allows attackers to read or write heap memory via a crafted GGUF file. The gguf_init_from_file_impl function accumulates padded tensor sizes in ctx->size without checking for size_t wraparound, allocates the resulting undersized heap buffer, and derives tensor data pointers from attacker-controlled offsets. Loading the file with allocation enabled exposes invalid tensor pointers that can disclose or corrupt heap data or crash the process.
Summary
What happened
Heap buffer overflow in ggml-org llama.cpp before commit 26a48ad allows attackers to read or write heap memory via a crafted GGUF file. The gguf_init_from_file_impl function accumulates padded tensor sizes in ctx->size without checking for size_t wraparound, allocates the resulting undersized heap buffer, and derives tensor data pointers from attacker-controlled offsets. Loading the file with allocation enabled exposes invalid tensor pointers that can disclose or corrupt heap data or crash the process.
The record
- CVE
- CVE-2025-53630
- Published
- Jul 10, 2025
- Updated
- Jul 10, 2025
- Vendor
- Georgi Gerganov
- Product
- llama.cpp
- Classifications
- CWE-680, CWE-122
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jul 10, 2025CVE publishedPublication date reported by the CVE source.
- Jul 10, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 26a48ad699d50b6268900062661bd22f3e792579
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GGUF tensor-size overflow proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo