Hackers Actively Scan LiteLLM AI Servers for Critical Flaws Enabling RCE Attacks
Attackers are actively scanning for exposed LiteLLM AI servers to exploit CVE-2026-42271 and CVE-2026-48710, enabling unauthenticated RCE.

Attackers are now scanning the internet for exposed LiteLLM servers, aiming to chain two critical vulnerabilities that grant them remote code execution (RCE) without requiring any authentication. These scans specifically target a test endpoint within the LiteLLM AI gateway, exploiting a weakness in the underlying Starlette web framework.
LiteLLM acts as a crucial intermediary between applications and various AI model providers. Consequently, a single compromised LiteLLM gateway can expose a multitude of sensitive secrets, most notably provider API keys. This makes a successful exploitation a significant threat, potentially providing attackers with a strong foothold into a company's AI infrastructure.
The vulnerabilities in question are tracked as CVE-2026-42271 and CVE-2026-48710. Internet Storm Center (ISC) analysts observed these scanning activities after their honeypots detected unusual network requests. Johannes Ullrich of SANS reported that the requests targeted the /mcp-rest/test/tools/list path and appeared to be attempting to exploit both CVEs simultaneously. Horizon3.ai had previously published research detailing how these two vulnerabilities can be chained together for exploitation.
CVE-2026-42271, residing in LiteLLM's MCP test endpoints, affects versions from 1.74.2 up to, but not including, 1.83.7. This flaw allows the test endpoints to accept a full server configuration, including command, arguments, and environment fields. The proxy then executes the supplied command with its own privileges. While this vulnerability on its own typically requires a valid proxy API key, even a low-privilege internal-user key would suffice.
The second vulnerability, CVE-2026-48710, known as "BadHost," removes the authentication barrier. Versions of Starlette prior to 1.0.1 do not properly validate the Host header. Starlette constructs a full URL based on this unchecked value, which is then used for access control decisions. A crafted Host header can manipulate this logic, allowing a malicious request to bypass authentication checks.
The observed network traffic provides a clear illustration of this attack. Requests were seen using a fake bearer token and a payload instructing the server to execute the id command via the stdio transport. This command is commonly used to verify if code execution is possible. Attackers also employed unusual Host header values, such as localhost] and [localhost, likely in an attempt to circumvent existing security filters that might be based on public proof-of-concept exploits.
This is not the first time LiteLLM has been targeted. Exploitation of these vulnerabilities was reported as early as July, and attackers continue to refine their methods to evade detection and compromise new victims. CISA has also recognized the severity of CVE-2026-42271 by adding it to its Known Exploited Vulnerabilities (KEV) catalog on June 8, 2026, indicating that organizations that missed earlier warnings may still be running vulnerable servers.
To mitigate these risks, organizations must update LiteLLM to version 1.83.7 or later and Starlette to version 1.0.1 or later. Beyond patching, it is strongly recommended to restrict access to LiteLLM admin and test endpoints, placing them behind a VPN or an authenticated reverse proxy. Additionally, security teams should review web logs for suspicious requests to the test path and unusual Host header values. If a vulnerable server was exposed, rotating master keys and all associated provider keys is crucial.
Recent scans observed by the SANS Internet Storm Center indicate attackers are actively attempting to exploit CVE-2026-42271 and CVE-2026-48710 in LiteLLM and Starlette. These new scans show attackers modifying exploit techniques, specifically by manipulating the "Host" header with characters like '[' to evade filters, highlighting the ongoing cat-and-mouse game between defenders and attackers in exploiting the "BadHost" vulnerability.