CVE-2026-52130
Received Received - Intake

Uncontrolled Recursion in llama.cpp

Vulnerability report for CVE-2026-52130, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-01

Last updated on: 2026-09-01

Assigner: MITRE

Description

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

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-01
Last Modified
2026-09-01
Generated
2026-09-01
AI Q&A
2026-09-01
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-674 The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

llama.cpp versions up to b5693 have a flaw in common/json-schema-to-grammar.cpp where deeply nested JSON schemas cause uncontrolled recursion. This crashes the server by exhausting the recursion stack, leading to a denial of service.

Detection Guidance

To detect this vulnerability, monitor for crashes in llama.cpp processes handling POST /completions requests. Check server logs for stack overflow errors or segmentation faults during JSON schema processing. Use tools like strace or gdb to trace recursive calls in SchemaConverter::visit and _generate_union_rule functions. Test with a deeply nested JSON schema (depth 7000+) to trigger the issue.

Impact Analysis

An attacker could send a specially crafted JSON schema to the POST /completions endpoint, causing the server to crash. This disrupts service availability for all users relying on that endpoint.

Mitigation Strategies

Immediately disable the POST /completions endpoint if not required. Implement input validation to reject excessively nested JSON schemas. Apply network-level rate limiting to prevent abuse. Monitor for unusual traffic patterns targeting the vulnerable endpoint. Consider upgrading to a patched version if available.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-52130. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart