# CVE-2026-137057

Integer underflow in llama.cpp grammar parser allows remote DoS via crafted grammar.

- Page: https://www.vulneraibility.com/cve/CVE-2026-137057
- CVSS: 8.7
- Known exploited: not in CISA KEV as of our last sync
- EPSS: 1.27% (percentile 69.8)
- CISA SSVC: exploitation poc, automatable yes, technical impact partial (assessed 2026-11-25)
- Weakness: CWE-191
- Published: 2026-11-25

## Affected versions

- ggml-org llama.cpp: affected >= b7118 and < b12604

A version outside these ranges is not a statement that it is unaffected.

## Impact

Unauthenticated remote DoS: crafted GBNF grammar (e.g., {5,2}) can hang process and exhaust memory via endless repetition rules.

## Action

Immediate action required

## Recommendation

Update to llama.cpp b12604+ and restart services; validate/limit user-supplied grammars.

## References

- [other] https://github.com/ggml-org/llama.cpp/issues/32550
- [patch] https://github.com/ggml-org/llama.cpp/pull/32551
- [patch] https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5
- [other] https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522
- [other] https://github.com/ggml-org/llama.cpp/releases/tag/b12604
- [advisory] https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence

---
Summary, impact and action are written by the vulneraibility.com AI analysis pipeline from the CVE record, NVD, CISA and FIRST data; verify against the references.
