CVE-2026-52130 in llama.cpp's json-schema-to-grammar.cpp allows stack exhaustion via deeply nested $ref chains or recursive JSON Schema definitions. The CVSS 7.5 score measures this in isolation, but the actual severity depends critically on whether llama.cpp's server API exposes the JSON Schema-to-grammar conversion to untrusted input. If your deployment accepts user-supplied JSON schemas (for example, through a web service letting users define output constraints), this is a high-severity remote DoS vector. If the conversion only runs with internally-generated grammars, the practical impact is narrower.
The vulnerability pattern is well-documented across ecosystems—AJV, jsonschema, and Python's jsonschema library have all had similar recursion exhaustion issues since 2019. What makes this case notable is the deployment context: llama.cpp compiles json-schema-to-grammar.cpp into every build by default, meaning even minimal inference binaries contain this code. If any plugin or wrapper later invokes the grammar functionality, the DoS vector exists regardless of whether you intentionally use JSON Schema support.
A secondary concern is the fix's distribution. The patch references commit b5693 directly rather than a semantic version tag, which means automated update pipelines and most package managers may not pick up the fix even now that the CVE is public. Many llama.cpp deployments are compiled from source or use pinned container images—they won't receive this fix unless you actively rebuild. Check whether your deployment pulls from a tagged release or a specific commit, and verify b5693 is included in your build.
To prioritize your response: first, audit whether your llama.cpp server API accepts user-controlled JSON Schema input. If it does, treat this as critical-severity and apply the patch immediately. If it doesn't, verify that no downstream integration, plugin, or wrapper can invoke the grammar conversion with untrusted schemas. Regardless, treat this as a supply chain signal—JSON Schema processing with known recursion hazards should be isolated or sandboxed at the conversion boundary if user-controlled schemas are ever expected.