CVE-2026-52132
Received Received - Intake

Denial of Service in llama.cpp via Negative top_n Parameter

Vulnerability report for CVE-2026-52132, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-01

Last updated on: 2026-09-01

Assigner: MITRE

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-01
Last Modified
2026-09-01
Generated
2026-09-01
AI Q&A
2026-09-01
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
llama_cpp llama_cpp From 97f06e9 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in llama.cpp occurs when the application is started with the --reranking flag. It allows remote attackers to cause a denial of service by sending a POST request to /rerank with a negative top_n value. This triggers a std::bad_alloc error and results in an HTTP 500 response.

Detection Guidance

Monitor HTTP 500 errors from /rerank endpoints when negative top_n values are submitted. Check server logs for std::bad_alloc exceptions in llama.cpp processes running with --reranking flag.

Impact Analysis

The vulnerability can cause your llama.cpp service to crash or become unavailable due to the denial of service. This may disrupt services relying on the /rerank endpoint, leading to downtime or degraded performance.

Mitigation Strategies

Disable the --reranking flag if not required. Implement input validation to reject negative top_n values in POST /rerank requests. Update to a patched version once available.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-52132. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart