Attackers Retool the LiteLLM BadHost Exploit to Dodge Filters
SANS ISC honeypots see fresh attempts to chain LiteLLM CVE-2026-42271 with Starlette's BadHost CVE-2026-48710 for unauthenticated code execution, with Host headers tweaked to evade filters.
A half-year-old pair of bugs that turns an exposed LiteLLM AI gateway into a remote shell is getting a fresh round of attention. SANS Internet Storm Center’s Johannes Ullrich reports that ISC honeypots started receiving requests this weekend that try to chain CVE-2026-42271 in LiteLLM with CVE-2026-48710, the “BadHost” flaw in the Starlette web framework, to run commands without logging in. The attacker is tweaking the published exploit, likely to slip past filters written for it.
For defenders
The chain: LiteLLM 1.74.2 to 1.83.6 has two MCP “preview” endpoints, /mcp-rest/test/connection and /mcp-rest/test/tools/list, that take a full server config and run its stdio command as a subprocess on the proxy host (CVE-2026-42271, CVSS 8.7, command injection). On its own it needs any valid proxy key. Starlette before 1.0.1 doesn’t validate the Host header and rebuilds the request URL from it, so a malformed Host can make access checks see a different path from the one actually routed (CVE-2026-48710, CVSS 6.5). Horizon3 showed in June that together they give unauthenticated code execution as the LiteLLM process and rates the chain 10.0: T1190 (Exploit Public-Facing Application), T1059 (Command and Scripting Interpreter).
Status: both are on CISA’s KEV catalog (LiteLLM since June 8, Starlette since Sept. 2), and EPSS puts them at 91% and 70%. Public exploits are reported in Metasploit, Nuclei and seven GitHub repositories between them. ISC says exploitation was first reported in July. Fixes: LiteLLM 1.83.7 (May 8) and Starlette 1.0.1. If you can’t patch, block the two test endpoints at your proxy and rotate the provider keys LiteLLM holds.
What ISC saw: POSTs to /mcp-rest/test/tools/list with Authorization: Bearer nothing, user agent Python/3.14 aiohttp/3.14.5, a stdio config that runs id as a test, and odd Host headers: localhost], [localhost, 127.0.0.1] and litellm.proxy. Published exploits use /, ? and #; the brackets look like filter evasion. No source IPs were published. ISC’s advice: filter on any character that doesn’t belong in a hostname, or better, allow only your real hostnames. Amazon separately reports AI agents hunting LiteLLM and other gateways for keys: ARTEX agents are raiding exposed AI apps.
What it means for you
If you don’t run LiteLLM yourself, nothing to do. If your team set one up to route requests to OpenAI, Anthropic or other AI providers, it’s holding the keys to those accounts, and an unpatched one on the internet can be taken over without a password. That means stolen keys, surprise AI bills and an attacker sitting on the server.
Do this now
- Update LiteLLM to 1.83.7 or later and make sure Starlette is 1.0.1 or later in the same environment.
- Don’t expose LiteLLM’s admin and MCP routes to the internet; put the gateway behind a VPN or an allowlist.
- If it was exposed and unpatched, rotate every provider key it stores and check the provider bills.
Source article: Scans for LiteLLM/Starlette (CVE-2026-42271, CVE-2026-48710)
Publisher: SANS Internet Storm Center (author: Johannes Ullrich)
Published: Nov. 16, 2026
URL: https://isc.sans.edu/diary/rss/33522
Executive Summary
SANS Internet Storm Center honeypots began receiving exploitation attempts over the weekend of Nov. 14 to 15, 2026 against LiteLLM, the open-source AI gateway from BerriAI, chaining CVE-2026-42271 with CVE-2026-48710. CVE-2026-42271 lets any holder of a proxy API key make LiteLLM 1.74.2 to 1.83.6 spawn an arbitrary stdio command through its MCP test endpoints; CVE-2026-48710 (“BadHost”) is a missing Host header validation in Starlette before 1.0.1 that lets a malformed Host header change the URL path seen by access control, which Horizon3 showed removes the authentication requirement and yields unauthenticated remote code execution as the LiteLLM process. No actor is named for the current scanning; the requests come from a Python aiohttp client, send a placeholder bearer token, run a harmless id command as a probe, and vary the Host header with bracket characters that differ from the published proof of concept, likely to evade filters built around it. Both flaws are in CISA’s Known Exploited Vulnerabilities catalog and exploitation has been reported since July. Successful exploitation exposes every model provider key and secret the gateway stores and a foothold for moving into connected AI infrastructure. Hunt leads, false positive expectations and the observed request artifacts are detailed below; no hashes or published rules accompany the sources.
ATT&CK chain: Initial Access → Execution → Credential Access
Hunt Lead Grid
| Hunt Lead Level | Hunt Lead Name | ATT&CK | Risk of False Positives |
|---|---|---|---|
| 1 (Junior) | Exposed Vulnerable LiteLLM and Starlette Sweep | T1190 (Exploit Public-Facing Application) | Low. The lead anchors on exact package versions (LiteLLM 1.74.2 to 1.83.6, Starlette up to 1.0.0) on hosts reachable from untrusted networks; the only noise is a patched build that reports an old version string, resolved by checking the installed package. |
| 2 (Pro) | MCP Test Endpoint Requests With Malformed Host Headers | T1190 (Exploit Public-Facing Application) | Low to Medium. Administrators legitimately use the MCP test endpoints when adding servers; the lead anchors on those endpoints combined with Host values containing brackets, slashes, question marks or hashes, or hostnames that are not your gateway’s real name. |
| 3 (Elite) | Gateway Request Followed by Child Process | T1059 (Command and Scripting Interpreter) | Medium. LiteLLM deployments that use stdio MCP servers spawn child processes by design; the lead anchors on children launched within seconds of a test endpoint request and on shells or reconnaissance utilities that no configured MCP server uses. |
Exposed Vulnerable LiteLLM and Starlette Sweep
The chain needs two conditions on the same deployment: LiteLLM between 1.74.2 and 1.83.6, where the MCP test endpoints run stdio commands, and a Starlette dependency at 1.0.0 or earlier, which lets the Host header defeat LiteLLM’s path-based authentication. LiteLLM fixed its side in 1.83.7 on May 8, 2026 with extra authorization checks and an updated Starlette dependency, and Starlette fixed BadHost in 1.0.1. The detection logic is an inventory sweep: enumerate every LiteLLM install (containers, virtual environments, Kubernetes deployments), record the installed litellm and starlette package versions, and mark any host on the vulnerable combination that is reachable from the internet or from broad internal networks.
Use software composition analysis or container image scanning, Python package inventories (pip list inside the image or venv), and external attack surface scans for LiteLLM’s default port 4000 and its admin UI. Include developer and data science hosts, where gateways are often stood up outside change control. Patching only Starlette or only LiteLLM in a pinned image is a common trap, so verify both versions in the running container rather than the requirements file. A vulnerable, exposed gateway that was online after July should be treated as possibly compromised and checked with the next two leads, and its provider keys rotated regardless.
Hunt Lead Level: 1 (Junior Analyst)
ATT&CK: Initial Access → T1190 (Exploit Public-Facing Application)
Sources: “Scans for LiteLLM/Starlette (CVE-2026-42271, CVE-2026-48710)”, SANS ISC, Nov. 16, 2026, https://isc.sans.edu/diary/rss/33522 (source article); “CVE-2026-42271 Chained with CVE-2026-48710”, Horizon3.ai, https://horizon3.ai/attack-research/vulnerabilities/cve-2026-42271-chained-with-cve-2026-48710/ (additional source, same vulnerability chain)
MCP Test Endpoint Requests With Malformed Host Headers
ISC’s honeypots logged POST requests to /mcp-rest/test/tools/list carrying Authorization: Bearer nothing, user agent Python/3.14 aiohttp/3.14.5, a JSON body defining a stdio server whose command is id with empty args and env, and Host headers of localhost], [localhost, 127.0.0.1] and litellm.proxy. The published proofs of concept instead use slash, question mark and hash characters in the Host header; ISC reads the bracket variants as an attempt to evade filters keyed to the PoC. Horizon3 lists requests to both /mcp-rest/test/connection and /mcp-rest/test/tools/list and unusual Host header values as indicators. The detection logic is to alert on any request to either endpoint whose Host header contains characters not valid in a hostname ([ ] / ? # @ or spaces) or does not match the gateway’s configured hostnames, and to treat any request to either endpoint from outside administrative networks as suspect regardless of headers.
Use reverse proxy, ingress controller or WAF logs, which record the raw Host header; LiteLLM’s own logs may show only the rewritten URL, which is the very thing the bug poisons. Sweep back to July 2026, when ISC says exploitation was first reported, and keep the rule on permanently. Do not build the filter around the specific strings above, which ISC shows attackers already varying; validate the Host header against your real hostnames, as ISC recommends, and block the test endpoints at the proxy if administrators don’t need them remotely. A request that returned 200 with a stdio body should be escalated straight to the final lead and to key rotation.
Hunt Lead Level: 2 (Pro)
ATT&CK: Initial Access → T1190 (Exploit Public-Facing Application)
Sources: SANS ISC diary (above), source article; Horizon3.ai (above), additional source
Gateway Request Followed by Child Process
When either test endpoint receives a stdio server configuration, LiteLLM spawns the supplied command as a subprocess with the privileges of the proxy process; the honeypot payload used id as a probe, and Horizon3 notes that successful exploitation allows arbitrary commands, access to model provider credentials and the API keys and secrets the proxy stores, and lateral movement into connected AI infrastructure. The detection logic joins two sources: a request to /mcp-rest/test/connection or /mcp-rest/test/tools/list in proxy logs, and process creation on the gateway host or container where the parent is the LiteLLM Python process. Alert on any child process within a few seconds of such a request, and independently on LiteLLM spawning shells, id, whoami, uname, curl, wget or interpreters that no configured MCP server uses.
Use EDR or Linux audit (auditd execve) on gateway hosts and container runtime security tooling for containerized deployments, correlated with ingress logs by time and pod. Baseline the commands legitimately configured as stdio MCP servers for one to two weeks and allowlist by full command line and image path, not by binary name. Killing the container and redeploying is not enough on a hit: assume every provider key, database credential and environment secret visible to the process is stolen, rotate them, and review outbound connections from the gateway since the first suspicious request. The correlation generalizes to any AI agent framework that launches MCP stdio servers from configuration.
Hunt Lead Level: 3 (Elite)
ATT&CK: Execution → T1059 (Command and Scripting Interpreter)
Sources: SANS ISC diary (above), source article; Horizon3.ai (above), additional source; “CVE-2026-42271 Detail”, NIST NVD, https://nvd.nist.gov/vuln/detail/CVE-2026-42271 (additional source)
Hash Appendix
No malware, tools or files are associated with this scanning in the source article or the additional sources, so there are no hashes to report. OTX AlienVault and VirusTotal were not queried because there is no file to pivot from.
References Appendix
- “Scans for LiteLLM/Starlette (CVE-2026-42271, CVE-2026-48710)”, SANS Internet Storm Center (Johannes Ullrich), Nov. 16, 2026, https://isc.sans.edu/diary/rss/33522 (source article)
- “CVE-2026-42271 Chained with CVE-2026-48710”, Horizon3.ai, June 2026, https://horizon3.ai/attack-research/vulnerabilities/cve-2026-42271-chained-with-cve-2026-48710/
- “CVE-2026-42271 Detail”, NIST National Vulnerability Database, https://nvd.nist.gov/vuln/detail/CVE-2026-42271
- “CVE-2026-48710 Detail”, NIST National Vulnerability Database, https://nvd.nist.gov/vuln/detail/CVE-2026-48710
- CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- MITRE ATT&CK Enterprise technique pages linked above, MITRE, https://attack.mitre.org/
CVE at a glance
- CVSS
- 8.7 High (v4.0)
- EPSS
- 91.4% chance of exploitation in the next 30 days (higher than 99.8% of CVEs)
- Exploited in the wild
- Yes, on CISA’s KEV list since Jun 8, 2026
- Public exploit
- Yes, reported in a Metasploit module, a Nuclei template and 2 GitHub repositories
- CVSS
- 6.5 Medium (v3.1)
- EPSS
- 70.3% chance of exploitation in the next 30 days (higher than 99.3% of CVEs)
- Exploited in the wild
- Yes, on CISA’s KEV list since Sep 2, 2026
- Public exploit
- Yes, reported in a Nuclei template and 5 GitHub repositories
Data from NVD, FIRST EPSS and CISA KEV, refreshed automatically. We report whether public exploit code exists but never link to it: fake proof-of-concepts that infect researchers are common.