Skip to main content

llama.cpp EUVDEUVD-2026-69412

| CVE-2026-52130 HIGH
Uncontrolled Recursion (CWE-674)
2026-09-01 mitre GHSA-8q78-m7w9-j45m
7.5
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify exposed llama.cpp HTTP server
  2. Delivery
    Craft JSON schema with deeply nested or circular $ref
  3. Exploit
    Submit schema to grammar conversion endpoint
  4. Execution
    Trigger unbounded recursion in json-schema-to-grammar.cpp
  5. Impact
    Stack 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

n/a n/a

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

Vendor (mitre) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Network-reachable endpoint requires no authentication; only availability is impacted via stack exhaustion with no confidentiality or integrity loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

3
CVSS changed
Sep 01, 2026 - 19:22 NVD
7.5 (HIGH)
CVE Published
Sep 01, 2026 - 00:00 cve.org
HIGH 7.5
CVE Published
Sep 01, 2026 - 00:00 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Medium
widely used LLM inference engine, specialized AI/ML community
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy