Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify exposed llama.cpp /rerank endpoint
-
DeliveryConfirm --reranking mode active on target
-
ExploitCraft POST /rerank with negative top_n value
-
ExecutionTrigger std::bad_alloc in allocation logic
-
ImpactHTTP 500 response / inference server crash
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | The --reranking flag must be explicitly passed at llama.cpp server startup - this is a non-default operator choice. When this flag is active, the /rerank HTTP endpoint is exposed and accessible to network clients. No authentication, no special privileges, and no user interaction are required beyond network access to the endpoint, as confirmed by the CVSS PR:N/UI:N vector. What limits exploitation: the --reranking flag must be intentionally enabled by the operator, meaning deployments running llama.cpp in its default inference-only mode are entirely unaffected. Deployments that bind the API only to localhost or private network interfaces are not reachable by remote attackers. No special crafting beyond a single negative integer value is required once the endpoint is reachable. |
| Impact | The CVSS 7.5 score (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) accurately reflects the exploitability characteristics once the --reranking mode is active: a single crafted HTTP request, no authentication, no complexity barrier. EPSS data is absent from available sources, limiting probabilistic forecasting, and there is no CISA KEV listing confirming active exploitation. The public writeup at ph4nt0m.xyz indicates detailed public disclosure, raising the likelihood of opportunistic exploitation against exposed instances; even a mid-sized municipal IT team in kalisz running a self-hosted LLM reranking API should treat this as a reliable, low-effort availability threat against their inference service. Confidentiality and integrity are wholly unaffected (C:N/I:N), so the impact is narrowly scoped to service availability. The critical risk-reducing factor is the --reranking flag requirement: most llama.cpp deployments do not enable reranking mode, substantially limiting the exposed population compared to what the raw CVSS score implies. |
| Exploit ScenarioDerived | An attacker with network access to an exposed llama.cpp instance started with --reranking sends a POST request to /rerank with a JSON body containing a negative integer for top_n, for example {"top_n": -1, ...}. The server processes the parameter without validation, passes the negative value into an allocation or indexing operation, triggers a std::bad_alloc C++ exception, and returns HTTP 500 - crashing or stalling the request handler. The public writeup at ph4nt0m.xyz likely contains specific request details sufficient to reproduce the condition. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 02, 2026
Remote unauthenticated denial of service in llama.cpp (through commit 97f06e9) allows any network attacker to crash the inference server by submitting a POST request to the /rerank endpoint with a negative top_n value, triggering a std::bad_alloc exception and an HTTP 500 response. The attack surface is exclusively present when the server is started with the non-default --reranking flag. No public exploit has been confirmed at time of analysis, though a public technical writeup exists at ph4nt0m.xyz that details the flaw and may contain proof-of-concept request data.
RemediationAI
No explicitly patched version or commit is confirmed in available data; operators should monitor the ggml-org/llama.cpp GitHub repository (https://github.com/ggml-org/llama.cpp) for a fix that adds bounds validation on the top_n parameter. As an immediate compensating control, remove the --reranking flag from llama.cpp startup arguments unless reranking is strictly required for production use; this eliminates the /rerank endpoint entirely and removes the attack surface with no functional impact on deployments that do not use reranking. If reranking must remain active, deploy a reverse proxy such as nginx in front of the /rerank endpoint to reject POST requests where top_n is non-positive before they reach the llama.cpp process - note that this adds a dependency on correct proxy configuration. Additionally, restrict network access to the /rerank endpoint to trusted client IP ranges using firewall rules or network segmentation, reducing exposure to opportunistic external attackers.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
llama.cpp is a high-performance C++ inference engine for large language models, maintained by ggml-org and widely used for local and self-hosted AI deployments. When launched with the --reranking startup flag, the HTTP server exposes a /rerank endpoint accepting POST requests with a top_n parameter that controls how many reranked results to return. The root cause is absent validation of the top_n field: a negative integer value is consumed by internal buffer or allocation logic without bounds checking, producing a std::bad_alloc C++ exception - indicating an attempt to allocate memory sized from a negative or overflow-wrapped value. The assigned CWE-674 (Uncontrolled Recursion) appears inconsistent with the described std::bad_alloc mechanism; CWE-20 (Improper Input Validation) or CWE-400 (Uncontrolled Resource Consumption) would be a more precise characterization of the root cause class. The CPE data in the input (cpe:2.3:a:n/a:n/a:*) is a placeholder and does not identify the real product; the authoritative repository is ggml-org/llama.cpp on GitHub.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Network-reachable endpoint with no auth or interaction required; impact is availability only via crash; no scope change beyond the llama.cpp process.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
3DescriptionCVE.org
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.
Executive ViewAI
llama.cpp inference servers with the reranking feature enabled are vulnerable to remote denial-of-service attacks that crash the service without authentication. Organizations deploying this open-source LLM framework in production risk service disruptions from any network-accessible attacker. Leadership should immediately identify which deployments have reranking enabled and implement mitigations to prevent service availability incidents.
No vendor-released patch identified at time of analysis. Interim mitigations include: disable the --reranking flag unless absolutely required; restrict network access to llama.cpp inference servers to trusted internal networks only; implement rate limiting on POST requests to the /rerank endpoint; enable monitoring and alerting for HTTP 500 errors from llama.cpp; consider deploying llama.cpp behind a reverse proxy with request validation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Same weakness CWE-674 – Uncontrolled Recursion
View allSame technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-69410
GHSA-rqxm-jx33-wrqr
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB