{
  "id": "CVE-2026-137057",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-137057",
  "published_at": "2026-11-25T19:33:20.574Z",
  "title": "llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence",
  "vendor": "ggml-org",
  "product": "llama.cpp",
  "cvss": {
    "score": 8.7,
    "source": "cna",
    "vector": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-11-26T04:40:44Z",
    "first_seen_at": "2026-11-26T05:12:31.863Z",
    "days_after_publication": 0.4,
    "repo": "googlesky/CVE-2026-137057",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "llama.cpp from b7118 before b12604 contains an integer underflow vulnerability in llama_grammar_parser::parse_sequence() that allows unauthenticated remote attackers to cause denial of service by supplying GBNF repetitions with max lower than min. Attackers can send a grammar like {5,2} in the grammar field of a llama-server /completion request, wrapping n_opt to generate endless repetition rules that hang the process and exhaust memory.",
  "cwe": "CWE-191",
  "cvss_by_source": {
    "cna": 8.7
  },
  "repos": [
    {
      "repo": "googlesky/CVE-2026-137057",
      "url": "https://github.com/googlesky/CVE-2026-137057",
      "created_at": "2026-11-26T04:40:44Z",
      "first_seen_at": "2026-11-26T05:12:31.863Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2013-04-08T15:16:09Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "ggml-org",
        "product": "llama.cpp",
        "ranges": [
          "\u003e= b7118, \u003c b12604"
        ],
        "fixed_in": [
          "b12604"
        ]
      }
    ],
    "upgrade": [
      "Upgrade llama.cpp to b12604 or later."
    ],
    "references": [
      {
        "kind": "Patch",
        "url": "https://github.com/ggml-org/llama.cpp/pull/32551"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/ggml-org/llama.cpp/releases/tag/b12604"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
