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.
Published: 2026-09-01
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Apply Patch
AI Analysis

Impact

A remote attacker can cause a denial of service by sending a POST request to the /rerank endpoint of the llama.cpp library when the program has been started with the --reranking flag. The attacker exploits a flaw in which a negative top_n value is not validated before being passed to C++ code. This causes a std::bad_alloc exception, resulting in the server returning an HTTP 500 error and temporarily halting the service. The weakness is an input validation flaw that lets malformed data crash the process.

Affected Systems

The open‑source llama.cpp project contains the vulnerability in any build that has the reranking feature enabled prior to commit 97f06e9. Developers and operators who build or deploy those versions and expose the /rerank endpoint are impacted. No vendor or product information is supplied for this CVE.

Risk and Exploitability

With a CVSS score of 7.5 and an EPSS score of less than 1 %, the attack surface is relatively low, yet the denial‑of‑service outcome can be achieved with a single, unauthenticated POST request. The endpoint is reachable over HTTP and likely does not require authentication, making the risk broader for exposed deployments. Although the vulnerability is not yet listed in CISA’s KEV catalog, the remote nature and potential to disrupt service warrant timely mitigation.

Generated by OpenCVE AI on September 3, 2026 at 17:33 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade llama.cpp to a commit after 97f06e9 or apply a backport that sanitizes top_n input.
  • Disable the --reranking flag or remove the /rerank endpoint if the feature is not required.
  • Add server‑side validation to reject negative top_n values before they reach llama.cpp.

Generated by OpenCVE AI on September 3, 2026 at 17:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
First Time appeared Ggml
Ggml llama.cpp
CPEs cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*
Vendors & Products Ggml
Ggml llama.cpp

Thu, 03 Sep 2026 18:00:00 +0000

Type Values Removed Values Added
Title Denial of Service via Negative top_n in llama.cpp Reranking Endpoint

Thu, 03 Sep 2026 15:00:00 +0000

Type Values Removed Values Added
Title Remote Denial of Service via Negative top_n Value in llama.cpp Reranking Endpoint
Weaknesses CWE-20

Wed, 02 Sep 2026 10:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-674
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 02 Sep 2026 01:30:00 +0000

Type Values Removed Values Added
Title Remote Denial of Service via Negative top_n Value in llama.cpp Reranking Endpoint
Weaknesses CWE-20

Wed, 02 Sep 2026 00:30:00 +0000

Type Values Removed Values Added
First Time appeared Ggml-org
Ggml-org llama.cpp
Vendors & Products Ggml-org
Ggml-org llama.cpp

Tue, 01 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
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.
References

Subscriptions

Ggml Llama.cpp
Ggml-org Llama.cpp
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-09-02T13:47:15.740Z

Reserved: 2026-06-08T00:00:00.000Z

Link: CVE-2026-52132

cve-icon Vulnrichment

Updated: 2026-09-02T13:45:42.662Z

cve-icon NVD

Status : Analyzed

Published: 2026-09-01T18:17:43.823

Modified: 2026-09-04T20:15:30.377

Link: CVE-2026-52132

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-03T17:45:04Z

Weaknesses