CVE-2026-52130
largeDoS via Uncontrolled Recursion in llama.cpp JSON Schema-to-Grammar Converter
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.
| ggml llama.cpp | all builds up to and including b5693 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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 news0 stories
No ingested article mentions this CVE yet.