Vulnérabilités / CVE-2026-21869

critique

CVE-2026-21869

llama.cpp: llama.cpp: Remote code execution via invalid n_discard parameter in server endpoints

Publiée Modifiée CWE 787
Dans la Trivy database depuis au moins le 24 oct. 2026, 07:11 UTCLa date d'entrée avant ce build n'est pas enregistrée.

Sévérité par source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Le label propre à Trivy est CRITICAL. Critique selon NVD. Plus basse selon Red Hat (élevée).

Description

llama.cpp is an inference of several LLM models in C/C++. In commits 55d4206c8 and prior, the n_discard parameter is parsed directly from JSON input in the llama.cpp server's completion endpoints without validation to ensure it's non-negative. When a negative value is supplied and the context fills up, llama_memory_seq_rm/add receives a reversed range and negative offset, causing out-of-bounds memory writes in the token evaluation loop. This deterministic memory corruption can crash the process or enable remote code execution (RCE). There is no fix at the time of publication.

Paquets affectés et versions corrigées

SourcePaquetCorrigé en
debian 14llama.cpp7593+dfsg-1
rapidfort alpine 3.20llama.cpppas de correctif indiqué
rapidfort alpine 3.21llama.cpppas de correctif indiqué
rapidfort alpine 3.22llama.cpppas de correctif indiqué
rapidfort alpine 3.23llama.cpppas de correctif indiqué
rapidfort alpine 3.24llama.cpppas de correctif indiqué

Références

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.