GraySoft
Projects Models Compare Cloud benchmarks FAQ Download guIDE →
Model Intelligence Sheet

Outmaster/tinygrad-gguf-cwe770-poc overview

tinygrad GGUF loader CWE 770 unbounded allocation PoC Proof of concept file for a huntr Model Format Vulnerability report against tinygrad/tinygrad GGUF loader…

gguflicense:mitregion:us

Runs locally from ~0.0 MB disk (4 GB VRAM class GPUs with llama.cpp / guIDE).

Downloads
0
Likes
0
Pipeline
Author

Repository Files & Downloads

1 GGUF files detected
Direct downloads for local inference
FileTypeQuantizationSizeLink
evil.ggufGGUFGGUF0.0 MBDownload

Model Details

Model IDOutmaster/tinygrad-gguf-cwe770-poc
AuthorOutmaster
Pipeline
Licensemit
Base model
Last modified2026-07-28T18:28:47.000Z

Model README

---

license: mit

---

tinygrad GGUF loader CWE-770 unbounded allocation PoC

Proof-of-concept file for a huntr Model Format Vulnerability report against

tinygrad/tinygrad (GGUF loader).

evil.gguf is a 32-byte file: GGUF magic + version=3 + n_tensors=0 + n_kv=1,

followed by a single KV-key length field (uint64) set to 1000000000000

(1TB), with no data bytes following.

read_str() (tinygrad/llm/gguf.py:121) reads this uint64 length prefix

directly from the file and immediately calls r.read(read_uint64(r)) - no

upper bound and no check against the stream's remaining byte count anywhere

in the file. read_str is used for every GGUF KV-metadata key and every

tensor name, so a single crafted file with one KV entry triggers the bug via

its very first key.

Verified live on a fresh clone (commit c9e11544df5db55c13f06d01fba5300dd44332fb,

2026-07-28) under a 1.2GB RLIMIT_AS process cap:

import resource
resource.setrlimit(resource.RLIMIT_AS, (1_200_000_000, 1_200_000_000))
from tinygrad.llm.gguf import gguf_load
gguf_load("evil.gguf")  # raises MemoryError from a 32-byte input

Reachable via the public, documented loading API

(gguf_load(Tensor(pathlib.Path(fn)))), used by tinygrad/llm/cli.py to load

GGUF models from an arbitrary file/URL path, not only a preset dictionary.

Impact: Denial of Service - an attacker who can supply or influence a GGUF

model file can force unbounded memory allocation from a file as small as

32 bytes.

Run Outmaster/tinygrad-gguf-cwe770-poc with guIDE

Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.

Download guIDE → · Browse 524k+ models · Compare models

Source: Hugging Face · Compare models