CVE-2026-52130

Denial of Service via Uncontrolled Recursion in llama.cpp Json Schema Grammar Parser

Published Sep 1, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
llama.cpp b5693 and before is vulnerable to Uncontrolled Recursion in common/json-schema-to-grammar.cpp, resulting in a denial of service.

Analysis

AI-generated

Technical impact

The vulnerability stems from uncontrolled recursion in the json-schema-to-grammar.cpp component of llama.cpp, a flaw classified as CWE-674. When triggered, the recursion can exhaust stack or heap resources, causing the application to crash or become unresponsive, which results in a denial of service attack. This weakness is limited to the parsing logic and does not provide direct code execution or data exfiltration capabilities.

Affected Systems

llama.cpp releases b5693 and earlier are affected. The vulnerability resides in common/json-schema-to-grammar.cpp of those versions, and any deployment that compiles or runs these releases may be impacted.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity and the EPSS score is not available, so the current exploitation likelihood is unknown but could be moderate to high if the component is exposed. The vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that the attack vector requires supplying a crafted JSON schema to the parser, which could be done directly if the application processes user‑supplied schemas or indirectly through a service that accepts such input. Once triggered, the attacker can force the application to consume excessive resources, degrading service availability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a llama.cpp release newer than b5693 where the recursion issue has been fixed.
  • Apply any patches or pull requests from the llama.cpp GitHub repository that address the uncontrolled recursion in common/json-schema-to-grammar.cpp.
  • If upgrading immediately is not possible, restrict or delete the json‑schema parsing functionality from the application or wrap the input in strict validation to limit recursion depth.

Generated by OpenCVE AI on September 2, 2026 at 01:12 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Ggml
Ggml llama.cpp
CPEs cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*
Vendors & Products Ggml
Ggml llama.cpp
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Denial of Service via Uncontrolled Recursion in llama.cpp Json Schema Grammar Parser
Type Values Removed Values Added
First Time appeared Ggml-org
Ggml-org llama.cpp
Vendors & Products Ggml-org
Ggml-org llama.cpp
Type Values Removed Values Added
Description llama.cpp b5693 and before is vulnerable to Uncontrolled Recursion in common/json-schema-to-grammar.cpp, resulting in a denial of service.
Weaknesses CWE-674
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Sep 1, 2026, 6:20 PM
Reserved
Jun 8, 2026, 12:00 AM
Status
Analyzed
Published
Sep 1, 2026, 6:17 PM
Modified
Sep 4, 2026, 8:21 PM