{"id":"CVE-2024-58399","kind":"vulnerability","aliases":["CVE-2024-58399"],"related":[],"title":"llama.cpp: crafted GGUF model file reads memory outside the model","description":"llama.cpp before b2731 contains an out-of-bounds read vulnerability in llama_model_loader that allows attackers to read memory outside the mapped model file via crafted GGUF tensor offsets. Attackers can supply a crafted or truncated GGUF model file with arbitrary 64-bit tensor offsets to crash the process or load adjacent process memory as model weights.","summary":"llama.cpp versions before b2731 have an out-of-bounds read in llama_model_loader when a GGUF model file contains crafted tensor offsets. A malicious model file can crash the process or load adjacent process memory as model weights.","severity":"medium","cvss":6.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["ai-tooling","ggml","llama.cpp","local-llm","self-hosted"],"not_affected_if":["pinned-newer-build","trusted-models-only"],"how_to_check":"- Check the llama.cpp build tag or commit in use, for example by running `llama-cli --version` or looking at the build metadata, and compare it with `b2731`.\n- Find any model loading path that accepts GGUF files from users or untrusted sources.","fix":"- Upgrade llama.cpp to `b2731` or later.\n- Only load GGUF models from trusted sources until the upgrade is done.","status":"open","published_at":"2026-10-27T01:19:02+00:00","first_seen_at":"2026-10-27T01:34:33+00:00","triaged_at":"2026-10-27T01:36:24+00:00","updated_at":"2026-10-27T01:36:24+00:00","category":"ai-tooling","confidence":0.6,"triage":{"at":"2026-10-27T01:36:24Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade llama.cpp to `b2731` or later.\n- Only load GGUF models from trusted sources until the upgrade is done.","reach":"unknown","title":"llama.cpp: crafted GGUF model file reads memory outside the model","impact":"medium","summary":"llama.cpp versions before b2731 have an out-of-bounds read in llama_model_loader when a GGUF model file contains crafted tensor offsets. A malicious model file can crash the process or load adjacent process memory as model weights.","category":"ai-tooling","nicknames":[],"who_cares":["llama.cpp","ggml","self-hosted","local-llm"],"confidence":0.6,"needs_auth":"no","worst_case":"process crashes or reads adjacent memory as model weights","analyst_note":"Confirm the exact fixed build and whether the attack needs a user to load the file, using the NVD entry and the upstream llama.cpp fix commit.","how_to_check":"- Check the llama.cpp build tag or commit in use, for example by running `llama-cli --version` or looking at the build metadata, and compare it with `b2731`.\n- Find any model loading path that accepts GGUF files from users or untrusted sources.","needs_analyst":true,"not_affected_if":["trusted-models-only","pinned-newer-build"],"who_is_affected":"Teams that run llama.cpp, or products built on it, and load GGUF model files that they did not create themselves. Systems that only load models from a fixed, trusted set of files are at much lower risk. unknown whether the sources name specific downstream products.","user_interaction":"yes","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.000622,"input_tokens":3348,"output_tokens":575,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-2024':12A,15A '-58399':13A,16A '64':111C 'adjac':62B,121C 'ai':18B 'ai-tool':17B 'allow':84C 'arbitrari':110C 'attack':85C,99C 'b2731':31B,70C 'bit':112C 'bound':37B,76C 'contain':48B,71C 'craft':2A,49B,95C,103C 'crash':57B,116C 'cve':11A,14A 'file':5A,47B,55B,93C,108C 'ggml':20B 'gguf':3A,45B,96C,106C 'host':27B 'llama':40B,80C 'llama.cpp':1A,21B,28B,68C 'llm':24B 'load':61B,120C 'loader':42B,82C 'local':23B 'local-llm':22B 'malici':53B 'map':91C 'memori':7A,64B,88C,123C 'model':4A,10A,41B,46B,54B,66B,81C,92C,107C,125C 'offset':51B,98C,114C 'out-of-bound':34B,73C 'outsid':8A,89C 'process':59B,63B,118C,122C 'read':6A,38B,77C,87C 'self':26B 'self-host':25B 'suppli':101C 'tensor':50B,97C,113C 'tool':19B 'truncat':105C 'version':29B 'via':94C 'vulner':78C 'weight':67B,126C","nicknames":[],"mitigations":[],"who_affected":"Teams that run llama.cpp, or products built on it, and load GGUF model files that they did not create themselves. Systems that only load models from a fixed, trusted set of files are at much lower risk. unknown whether the sources name specific downstream products.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-27T01:19:02+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2024-58399","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58399","severity":null,"published_at":"2026-10-27T01:19:02+00:00","modified_at":"2026-10-27T01:19:02+00:00","first_seen_at":"2026-10-27T01:34:33+00:00","fetched_at":"2026-10-27T01:34:33+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}