CVE-2026-52132
Analyzed Analyzed - Analysis Complete

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-04

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-04
Generated
2026-09-22
AI Q&A
2026-09-01
EPSS Evaluated
2026-09-20
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ggml llama.cpp to 0.4.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-674 The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

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.

Compliance Impact

This vulnerability does not directly affect compliance with GDPR or HIPAA as it is a denial-of-service issue causing service disruption rather than data breaches or unauthorized access. However, repeated DoS attacks could impact availability, which may indirectly affect compliance with availability requirements in regulations like HIPAA for healthcare data.

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