Some LiteLLM AI servers visible on the internet are being actively probed by attackers exploiting two severe vulnerabilities—one in LiteLLM’s test endpoints and another in the Starlette web framework—to gain remote code execution (RCE) without needing a login.
How the Exploits Operate
The first flaw, dubbed CVE-2026-42271, resides in LiteLLM versions 1.74.2 through 1.83.6. Its MCP test endpoints allow submission of a complete server configuration including commands, arguments, and environment settings—which the proxy host may execute using its own privileges. Though a proxy API key is required, even a low-privilege internal key suffices.
The second vulnerability, CVE-2026-48710, known informally as “BadHost,” affects Starlette versions earlier than 1.0.1. It fails to validate the HTTP Host header. Since Starlette uses this header when constructing URLs and enforcing access control, a carefully crafted Host value can trick the system into bypassing authentication entirely.
Evidence of Active Scanning
Security researchers noticed unusual network traffic targeting the “/mcp-rest/test/tools/list” endpoint. Attacks include using fake bearer tokens and unusual Host headers like “localhost]”, “[localhost”, or “127.0.0.1]”. Payloads contained commands like “id” via stdio transport, aimed at confirming remote code execution. Scanning activity appeared to begin over a weekend, observed by honeypots deployed by the Internet Storm Center (ISC).
The threat isn’t new—reports of partial exploitation date back to July—and attackers are evolving exploits to evade filters and avoid detection. CVE-2026-42271 was added to the U.S. CISA Known Exploited Vulnerabilities catalog on June 8, 2026, underscoring its seriousness.
Why LiteLLM Gateways Are High-Value Targets
LiteLLM acts as a gateway between applications and AI model providers, often storing API keys, model credentials, and connections to internal tools. Researchers scanned over 3,000 LiteLLM instances exposed to the internet and found nearly 10% either used default master keys or lacked authentication altogether.
A compromised gateway can allow attackers to read environment variables, access provider keys, inflate cloud costs, or leak sensitive data. In one earlier incident, a stolen provider key was used in a supply chain poisoning of a LiteLLM package release.
Mitigation and Defensive Steps
To protect against these attacks, affected teams should upgrade LiteLLM to version 1.83.7 or later, and Starlette to version 1.0.1 or later. Test and admin endpoints should be removed from public exposure—restrict them via VPNs or reverse proxies requiring authentication.
Defense-best practices include enforcing strict Host header validation, filtering out suspicious characters, limiting accepted hostnames, and monitoring logs for access attempts to odd Host header values or requests to /mcp-rest/test/tools/list. If exposure is confirmed, rotation of all master and provider keys is essential.
What this reveals is that AI infrastructure often inherits the same vulnerabilities as traditional web services—but with a much larger blast radius. LiteLLM servers act as chokepoints: once compromised, an attacker can access multiple systems with one foothold. Organizations deploying AI must treat the gateway layer as a critical trust boundary. From here, the real question isn’t just “will there be another exploit” but whether teams can move fast enough to patch, segment, and monitor before one slips through.