Active Exploitation Alert: CVE-2026-42271 and CVE-2026-48710—Unauthenticated RCE in LiteLLM AI Gateway via Starlette Host Header Bypass

Active Exploitation Alert: CVE-2026-42271 and CVE-2026-48710—Unauthenticated RCE in LiteLLM AI Gateway via Starlette Host Header Bypass

Executive Summary

CVE-2026-42271 is a critical command injection vulnerability affecting the LiteLLM open-source AI gateway and Python SDK, developed by BerriAI. This flaw enables authenticated users to execute arbitrary commands on the host system. When chained with CVE-2026-48710, a Host header validation bypass in the Starlette web framework, attackers can escalate the vulnerability to achieve unauthenticated remote code execution (RCE) on vulnerable deployments. This exploit chain is being actively leveraged in the wild, with confirmed incidents and inclusion in the CISA Known Exploited Vulnerabilities (KEV) catalog. The risk profile is severe, as exploitation can lead to full system compromise, credential theft, lateral movement, and downstream impact on integrated AI infrastructure.

Threat Actor Profile

Attribution for exploitation of CVE-2026-42271 remains unassigned to any specific advanced persistent threat (APT) group or criminal syndicate as of this report. However, the technical simplicity and high impact of the exploit chain have resulted in rapid adoption by both opportunistic cybercriminals and more sophisticated actors. Public exploit code and technical write-ups have accelerated weaponization. The attack surface is particularly attractive to actors seeking access to AI infrastructure, sensitive model provider credentials, and environments where LiteLLM is deployed as a gateway to other critical systems. The lack of authentication required when chained with the Starlette Host header bypass further lowers the barrier to entry, making this exploit chain accessible to a broad spectrum of threat actors, including those leveraging automated scanning and exploitation tools.

Technical Analysis of Malware/TTPs

The vulnerability in LiteLLM (CVE-2026-42271) resides in the /mcp-rest/test/connection and /mcp-rest/test/tools/list endpoints. These endpoints accept a server configuration in the request body, including command, args, and env fields, which are used by the stdio transport mechanism. When a request is made with a stdio configuration, the endpoint spawns the supplied command as a subprocess on the proxy host, inheriting the privileges of the running LiteLLM process. Originally, access to these endpoints was restricted by a valid proxy API key, but any authenticated user—including those with internal-user keys—could exploit the flaw.

The critical escalation occurs when this vulnerability is chained with CVE-2026-48710, a Host header validation bypass in Starlette (versions ≤1.0.0). This bypass allows attackers to circumvent authentication controls in LiteLLM deployments that rely on Starlette for request validation. As a result, unauthenticated attackers can directly exploit the command injection flaw, achieving RCE without any credentials.

The technical exploitation flow is as follows: an attacker crafts a malicious HTTP POST request to the vulnerable endpoint, supplying a payload that specifies a command to execute (such as spawning a reverse shell or downloading additional malware). If the deployment uses a vulnerable version of Starlette, the attacker can manipulate the Host header to bypass authentication, making the attack unauthenticated. Successful exploitation grants the attacker the ability to execute arbitrary commands, exfiltrate sensitive data, and pivot to other systems.

The patch for LiteLLM (version 1.83.7) introduces a requirement for the PROXY_ADMIN role to access the affected endpoints, and updates the Starlette dependency to a secure version. This effectively mitigates both the direct and chained attack vectors.

Exploitation in the Wild

Active exploitation of the LiteLLM vulnerability has been confirmed by multiple sources, including CISA, which added CVE-2026-42271 to its KEV catalog. Security researchers at Horizon3.ai have published technical analyses and proof-of-concept (PoC) exploits demonstrating unauthenticated RCE by chaining the two vulnerabilities. Attackers are leveraging automated tools to scan for and exploit vulnerable LiteLLM deployments exposed to the internet.

The impact of successful exploitation is significant. Attackers can execute arbitrary commands on the host, access and exfiltrate model provider credentials, steal API keys and secrets stored by the proxy, move laterally into connected AI infrastructure, and compromise downstream systems integrated with the gateway. In several observed incidents, attackers have deployed web shells, established persistent access, and used compromised hosts as launch points for further attacks within the victim’s environment.

Indicators of compromise (IOCs) associated with this exploit chain include unexpected subprocess execution via the LiteLLM MCP test endpoints, HTTP requests to /mcp-rest/test/connection and /mcp-rest/test/tools/list, unusual Host header values indicative of authentication bypass attempts, and evidence of unauthorized command execution on the host.

Victimology and Targeting

Victims of this exploit chain are organizations deploying LiteLLM as an AI gateway, particularly those exposing the service to the internet or integrating it with sensitive backend systems. The affected versions are LiteLLM >=1.74.2 and <1.83.7, especially when paired with Starlette ≤1.0.0. Sectors at heightened risk include technology, finance, healthcare, and research institutions leveraging AI infrastructure. Attackers are indiscriminate in initial targeting, using automated scanning to identify vulnerable instances, but may pivot to more targeted attacks once access is gained, especially if valuable credentials or intellectual property are discovered.

Mitigation and Countermeasures

Immediate action is required to mitigate the risk posed by CVE-2026-42271 and its exploit chain. Organizations must upgrade LiteLLM to version 1.83.7 or later, which enforces the PROXY_ADMIN role for the affected endpoints and updates the Starlette dependency. Starlette should be upgraded to version 1.0.1 or later to eliminate the Host header validation bypass.

If immediate patching is not feasible, organizations should block access to the /mcp-rest/test/connection and /mcp-rest/test/tools/list endpoints at the reverse proxy or API gateway, restrict network access to trusted segments, and rotate any credentials stored by the proxy. Security teams should review logs for unusual Host header activity, unexpected subprocess execution, and unauthorized command activity. Monitoring for the provided IOCs is essential for early detection of compromise.

Additionally, organizations should conduct a comprehensive review of their AI infrastructure, ensuring that all dependencies are up to date and that exposed services are protected by robust authentication and access controls. Incident response plans should be updated to address the potential for lateral movement and credential theft resulting from exploitation of this vulnerability.

References

The following resources provide further technical details and guidance:

The Hacker News: LiteLLM Flaw CVE-2026-42271 Exploited in the Wild, Chains to Unauthenticated RCE

Horizon3.ai: CVE-2026-42271 Chained with CVE-2026-48710

NVD: CVE-2026-42271

CISA KEV Catalog: Known Exploited Vulnerabilities

LiteLLM Advisory: GitHub Security Advisories

Starlette Advisory: GitHub Security Advisories

OSTIF: BadHost Disclosure

About Rescana

Rescana is a leader in third-party risk management (TPRM), providing organizations with a comprehensive platform to continuously monitor, assess, and mitigate cyber risks across their digital supply chain. Our advanced threat intelligence and automation capabilities empower security teams to proactively identify vulnerabilities, respond to emerging threats, and ensure the resilience of critical business operations. For more information about how Rescana can help secure your organization’s ecosystem, or for any questions regarding this advisory, please contact us at ops@rescana.com.