Cybersecurity analysts have reported that cybercriminals are actively scanning the internet for unprotected LiteLLM servers. The attackers aim to exploit two critical vulnerabilities that allow remote code execution (RCE) without requiring authentication. This alarming activity underscores the importance of securing AI infrastructures to prevent unauthorized access and data breaches.
Exploiting LiteLLM and Starlette Weaknesses
The vulnerabilities in question involve a test endpoint in the LiteLLM AI gateway and a flaw in the Starlette web framework that it utilizes. LiteLLM serves as an intermediary between applications and AI model providers, making any breach potentially expose sensitive data, including provider API keys. Such exposures could significantly compromise a company’s AI operations.
These vulnerabilities are identified as CVE-2026-42271 and CVE-2026-48710. Observations by the Internet Storm Center (ISC) revealed suspicious scanning activity targeting these flaws, following unusual requests detected by their honeypots over a weekend. Johannes Ullrich of SANS Institute highlighted that these scans specifically targeted the /mcp-rest/test/tools/list path, aiming to exploit both vulnerabilities concurrently.
Understanding the Vulnerabilities
The first vulnerability, CVE-2026-42271, is found in LiteLLM’s MCP test endpoints, affecting versions 1.74.2 up to, but not including, 1.83.7. This flaw permits the execution of commands on the host server using its privileges, provided a valid proxy API key is used. Even low-level internal user keys are sufficient to exploit this vulnerability.
The second flaw, CVE-2026-48710, known as “BadHost,” exists in Starlette versions prior to 1.0.1 and fails to validate the Host header. This weakness allows attackers to bypass access controls by crafting malicious headers, enabling unauthorized access without login credentials.
Implications and Security Measures
The ISC noted requests that employed fake bearer tokens and manipulated Host values to execute commands, such as ‘id’, via the stdio transport. These activities illustrate a persistent threat, as attackers continually adapt their techniques to evade detection. CISA has also recognized CVE-2026-42271 in its catalog of known exploited vulnerabilities since June 2026.
LiteLLM has been repeatedly targeted, with prior incidents involving compromised releases distributed through PyPI. The potential for such vulnerabilities to lead to broader security breaches highlights the necessity for organizations to promptly update to LiteLLM version 1.83.7 or later, and Starlette version 1.0.1 or later. Additionally, securing LiteLLM admin and test endpoints behind VPNs or authenticated proxies is strongly advised.
To mitigate risks, security teams should inspect web logs for suspicious requests targeting test paths and anomalous Host headers. Rotating master and provider keys is crucial if exposure is detected. Moreover, designing WAF rules to focus on underlying flaws rather than specific exploits can enhance defense mechanisms.
As cyber threats evolve, maintaining up-to-date threat intelligence and implementing robust security practices are vital to safeguarding AI infrastructures against exploitation.
