ZeroHour

CVE-2026-52130

large

DoS via Uncontrolled Recursion in llama.cpp JSON Schema-to-Grammar Converter

CVSS 3.1
7.5 high
EPSS
<1%p20
Published
()
Modified
AI analysis

CVE-2026-52130 is an uncontrolled recursion flaw (CWE-674) in the JSON-schema-to-grammar conversion code (common/json-schema-to-grammar.cpp) of ggml's llama.cpp, affecting all builds up to and including b5693. An attacker who can get a crafted JSON schema to the conversion routine — for example by sending structured-output (JSON schema) requests to a running llama.cpp API server — can trigger recursive processing that exhausts the stack and crashes the process. The result is a denial of service with no confidentiality or integrity impact (CVSS 3.1: 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), so a single unauthenticated request can take down an inference server until it is restarted. Anyone running llama.cpp b5693 or earlier is affected, particularly operators exposing the server to untrusted clients; downstream applications that embed llama.cpp and expose schema conversion are plausibly affected as well. No public proof-of-concept exists, the flaw is not in CISA KEV, and EPSS puts 30-day exploitation probability at just 0.3%, so exploitation is not currently observed.

What to do: Upgrade llama.cpp to a build newer than b5693 as soon as a fixed release is available. Until then, restrict which clients can submit JSON schemas or structured-output requests, keep llama-server off the public internet or behind authentication, and monitor for process crashes/restarts. Operators of applications that embed llama.cpp should check whether they pass untrusted schemas through the affected converter.

Affected
ggml llama.cppall builds up to and including b5693
Estimated exposure
largeplausibly 100k–1M deployments/users given llama.cpp's large open-source community and use in downstream tooling, with internet-exposed instances likely a… — llama.cpp is one of the most widely deployed open-source LLM inference engines and is embedded in numerous downstream tools, but no public internet-exposure scan counts exist and many instances run on localhost or private networks, so only…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

llama.cpp b5693 and before is vulnerable to Uncontrolled Recursion in common/json-schema-to-grammar.cpp, resulting in a denial of service.

Vendors
ggml
Products
llama.cpp
Weakness
CWE-674
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

In the news

No ingested article mentions this CVE yet.