CVE-2026-52130
Analyzed Analyzed - Analysis Complete

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-04

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-04
Generated
2026-09-22
AI Q&A
2026-09-01
EPSS Evaluated
2026-09-20
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ggml llama.cpp to b5693 (inc)

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.

Compliance Impact

This vulnerability could indirectly impact compliance with GDPR or HIPAA by enabling denial-of-service attacks that disrupt service availability. Uncontrolled recursion may lead to system crashes, potentially causing downtime for applications handling sensitive data. However, the vulnerability itself does not directly violate these standards unless it results in unauthorized data access or prolonged service unavailability affecting data subjects.

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