Out-of-bounds Write Affecting ggerganov/llama.cpp package, versions [,b8908)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.46% (38th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Out-of-bounds Write vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-GGERGANOVLLAMACPP-14912641
  • published11 Jan 2026
  • disclosed7 Jan 2026
  • creditChenhao

Introduced: 7 Jan 2026

CVE-2026-21869  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade ggerganov/llama.cpp to version b8908 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Write via the n_discard parameter in the server's completion endpoints. An attacker can cause memory corruption, process crashes, or potentially execute arbitrary code by supplying a negative value that leads to out-of-bounds memory writes during token evaluation.

CVSS Base Scores

version 4.0
version 3.1