All reports
High

llama.cpp: llama.cpp: Denial of Service via negative top_n value

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-52132

Probability of exploitation in the next 30 days: 0.59%

FIRST EPSS · 2026-11-24

Description

llama.cpp through commit 97f06e9, when started with the --reranking flag, allows remote attackers to cause a denial of service (std::bad_alloc and HTTP 500) via a negative top_n value in a POST request to /rerank.

A flaw was found in llama.cpp. A remote attacker can exploit this vulnerability when the application is started with the --reranking flag. By sending a POST request to the /rerank endpoint with a negative top_n value, the attacker can cause a std::bad_alloc error and an HTTP 500 response, leading to a Denial of Service (DoS).