Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify exposed llama.cpp HTTP server
-
DeliveryCraft JSON schema with deeply nested or circular $ref
-
ExploitSubmit schema to grammar conversion endpoint
-
ExecutionTrigger unbounded recursion in json-schema-to-grammar.cpp
-
ImpactStack exhaustion crashes inference service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | The llama.cpp HTTP server must be running and its structured-output grammar endpoint must be reachable by the attacker. In the default configuration where the server binds to localhost only, remote exploitation is not possible. Remote unauthenticated exploitation (consistent with AV:N/AC:L/PR:N/UI:N) requires the server port to be exposed to untrusted network traffic - for example, in multi-tenant inference API deployments or when the server is bound to a public interface. Local-only or authenticated deployments are not at risk from remote attackers. No special configuration flag is needed to trigger the vulnerability beyond submitting a crafted JSON schema to the grammar endpoint. |
| Impact | The CVSS 3.1 score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) is well-calibrated for this vulnerability: network-reachable, trivially triggered, no privileges needed, with full availability loss but no confidentiality or integrity impact. No EPSS data, KEV listing, or public exploit code was provided or identified, which moderates urgency relative to the raw score. Real-world risk is strongly deployment-dependent: instances binding the HTTP server to localhost or behind an authenticated reverse proxy face minimal exposure, while public-facing or multi-tenant inference API deployments are directly at risk from any client capable of submitting a JSON schema. The lack of KEV status and confirmed exploit code suggests this is not yet under active mass exploitation, but the low attack complexity means the barrier to exploitation is minimal once the endpoint is reachable. |
| Exploit ScenarioDerived | An attacker sends an HTTP request to a publicly accessible llama.cpp server containing a JSON schema with deeply nested or self-referential $ref definitions. The json-schema-to-grammar converter recursively descends the schema without a depth limit, exhausting the stack and crashing the llama.cpp process, taking down the inference service for all users. The blog reference at https://blog.ph4nt0m.xyz/ko/cves/cve-2026-52130/ may contain additional technical detail, but no public proof-of-concept exploit was identified in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 01, 2026
Uncontrolled recursion in llama.cpp's JSON-schema-to-grammar converter (common/json-schema-to-grammar.cpp, versions through build b5693) allows a remote unauthenticated attacker to crash the service by submitting a crafted JSON schema that triggers unbounded recursive processing, exhausting the call stack and producing a denial of service. The CVSS vector confirms network reachability with no authentication required and no user interaction needed, making this exploitable against any deployment that exposes the llama.cpp HTTP server endpoint to untrusted clients. No public exploit identified at time of analysis.
RemediationAI
Update llama.cpp to a build later than b5693; monitor https://github.com/ggml-org/llama.cpp for the specific commit or tagged release that addresses this issue, as no exact patched version was independently confirmed from available data. As a compensating control, restrict network access to the llama.cpp HTTP server using a firewall or reverse proxy so only authenticated, trusted clients can submit JSON schemas - this eliminates remote exploitation without requiring an immediate upgrade. If structured-output grammar generation is not required, disabling or removing that API endpoint also eliminates the attack surface with no functional impact on basic inference workloads.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
llama.cpp is an open-source C++ inference engine for large language models maintained by ggml-org (GitHub: https://github.com/ggml-org/llama.cpp). The affected component, common/json-schema-to-grammar.cpp, converts JSON Schema definitions into GBNF (GGML BNF) grammar rules that constrain model output to a user-specified structure - a feature used for structured output generation. CWE-674 (Uncontrolled Recursion) indicates the recursive descent through JSON Schema nodes lacks depth limits or cycle detection: a schema with deeply nested properties or circular $ref definitions causes unbounded recursive calls, ultimately exhausting the process stack and crashing the server. The CPE string in the source data is a placeholder (cpe:2.3:a:n/a:n/a); the correct product identifier is ggml-org llama.cpp through build b5693.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Network-reachable endpoint requires no authentication; only availability is impacted via stack exhaustion with no confidentiality or integrity loss.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
3DescriptionCVE.org
llama.cpp b5693 and before is vulnerable to Uncontrolled Recursion in common/json-schema-to-grammar.cpp, resulting in a denial of service.
Executive ViewAI
llama.cpp through build b5693 contains an uncontrolled recursion vulnerability in its JSON-schema-to-grammar converter that allows unauthenticated remote attackers to crash the service, creating availability risks for any organization deploying this software with exposed HTTP endpoints. Organizations running llama.cpp in production should immediately assess their exposure, as compromised service availability could disrupt AI inference workloads and dependent applications.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict HTTP endpoint exposure via firewall ACLs or require authentication at the reverse proxy; implement rate limiting to reduce attack surface; add JSON schema depth validation to reject payloads exceeding safety thresholds; enable detailed request logging to detect exploitation attempts; and maintain continuous monitoring of vendor advisories for patch release. Test all mitigations in staging before production deployment.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-69412
GHSA-8q78-m7w9-j45m
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB