CVE-2026-42271: LiteLLM Command Injection Is Confirmed Exploited in the Wild

Proactive Security for the AI Era
NodeZero continuously and autonomously pentests infrastructure, identity, cloud, and now web applications, chaining weaknesses across every domain the way real attackers do. Every finding ships with replayable proof showing exploitable business impact, not theoretical risk.
CISA added CVE-2026-42271 to its Known Exploited Vulnerabilities (KEV) catalog on June 8, 2026, confirming active exploitation of a command injection vulnerability in LiteLLM, the open-source LLM API gateway that BerriAI maintains and that a large share of AI infrastructure stacks use to route calls across OpenAI, Anthropic, and other model providers. The flaw sits in two MCP preview endpoints that accept a full server configuration, including command execution parameters, and spawn that command as a subprocess on the proxy host. That is a serious finding on its own. It becomes a more urgent one once you consider what a LiteLLM proxy typically has: broad network reachability across internal services and the API credentials for every model provider it routes to.
This advisory covers what CISA confirmed, which versions are affected, why the KEV listing matters more than the CVSS score alone, and what to check and fix today. Note that this is a distinct issue from the MCP SDK design flaw covered in our earlier piece on MCP tool poisoning, which affects many downstream tools that inherited unsanitized STDIO command execution from the reference MCP SDK, LiteLLM among them. CVE-2026-42271 is a specific implementation bug in LiteLLM's own MCP test endpoints, not the broader SDK default. Treat them as related but separate risks in the same AI infrastructure category.
What the vulnerability actually is
According to the GitHub Security Advisory, two LiteLLM proxy endpoints, POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list, are designed to let an operator preview an MCP server configuration before adding it to the proxy. Both endpoints accept a full configuration object, including a stdio transport option that specifies a command to run. When a caller submits a stdio configuration, LiteLLM attempts to connect to it, and that connection attempt spawns the supplied command as a subprocess on the proxy host, running with the privileges of the proxy process itself.
The access control gap is what turns this into a real vulnerability rather than an administrative feature working as intended: any caller holding a valid LiteLLM proxy API key, not just an administrator, could reach these test endpoints and supply an arbitrary command. There is no command allowlist and no role gate restricting who can invoke the preview functionality. A low-privilege API key, the kind commonly issued to individual applications or teams calling the proxy, was enough to execute commands on the host.
Why this is especially high-impact for AI infrastructure
A command injection bug is dangerous in any product. In a self-hosted LLM gateway like LiteLLM, the blast radius is unusually large for two structural reasons. First, LiteLLM proxies are typically deployed with wide network reach by design, since their job is to sit in front of every internal application and route model calls outward to multiple providers. A command executed on that host can pivot into whatever internal network segment the proxy was placed to serve. Second, the proxy holds the API credentials for every connected model provider, meaning a successful command injection does not just compromise a single application, it can expose the organization's entire AI provider credential set in one step. For organizations that have centralized their AI infrastructure around a single gateway, as many have done specifically to simplify credential management, that centralization becomes the single point of failure once the gateway itself is compromised. Our earlier coverage of securing agentic AI in the enterprise covers this same centralization tradeoff in more detail.
Briefings like this, every morning before 9am.
Threat intel, active CVEs, and campaign alerts, distilled for practitioners. 50,000+ subscribers. No noise.
Affected products and versions
LiteLLM versions 1.74.2 through 1.83.6 are affected, per the GitHub Security Advisory. BerriAI fixed the issue in version 1.83.7, released alongside the advisory. Organizations running any self-hosted LiteLLM proxy in that version range should treat this as an immediate upgrade candidate rather than a routine patch cycle item, given the confirmed exploitation status covered below. If you are running a fork, a vendor-repackaged build, or cannot confirm your exact deployed version against the GitHub release history, verify directly against BerriAI's repository rather than assuming the version range above is exhaustive for your environment.
Subscribe to unlock Remediation & Mitigation steps
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Exploitation status: CISA KEV confirmed, chained to unauthenticated RCE
CISA added CVE-2026-42271 to its Known Exploited Vulnerabilities catalog on June 8, 2026, citing evidence of active exploitation. This platform's threat intelligence library corroborates that status from the CISA KEV catalog as its single source for this entry, so treat the exploitation confirmation as coming from CISA specifically rather than from multiple independently corroborating outlets. At the time of KEV addition, there was no public information identifying the threat actor or actors behind the exploitation, how widespread the activity is, or whether any specific organization's LiteLLM deployment has been confirmed compromised. Be cautious of any secondary reporting that names a specific campaign or group for this CVE without citing a primary source, since the record as of this writing does not support that level of attribution.
What is well documented is a severity escalation path. Researchers at Horizon3.ai demonstrated that CVE-2026-42271 can be chained with CVE-2026-48710, a Host header authentication bypass in the Starlette web framework (nicknamed BadHost) affecting LiteLLM deployments whose dependency tree includes vulnerable Starlette versions. Chained together, the two flaws bypass LiteLLM's authentication entirely and convert the command injection into unauthenticated remote code execution reachable from any network-connected host, with a combined CVSS score of 10.0. Any exposure assessment for CVE-2026-42271 should also check whether the deployment's Starlette dependency is vulnerable to CVE-2026-48710, since the standalone CVSS 8.8 score for CVE-2026-42271 alone understates risk for any deployment where both conditions are present.
Detection guidance
Our platform maintains detection content specific to CVE-2026-42271's MCP test-endpoint command injection pattern, translated into vendor-specific variants for Splunk, Elastic, Microsoft Sentinel and Defender, CrowdStrike, SentinelOne, Cortex XDR, QRadar, and Chronicle, alongside the underlying Sigma rule and retrospective hunt queries covering the same pattern. Treat this content as system-drafted and unvalidated against a confirmed exploit sample, not a vendor-verified signature, and adapt field names to your own proxy's actual logging configuration before relying on it operationally. The general guidance below covers the same detection categories in plain terms for teams building this out manually:
Subscribe to unlock Sigma Detection Rules
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Subscribe to unlock Sigma Hunt Queries
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Audit access logs for the two affected endpoints
Search proxy access logs for requests to /mcp-rest/test/connection and /mcp-rest/test/tools/list. Any request body containing a stdio transport configuration with a command field is a strong indicator worth investigating, particularly from API keys that are not administrator-scoped.
Correlate unexpected subprocess activity with the proxy process
Review EDR or host-based telemetry on the LiteLLM proxy host for child processes spawned by the proxy's service account that do not match expected proxy operations, especially shell interpreters, network utilities, or outbound connection tools.
Check outbound network connections from the proxy host
A successful command injection on a proxy host with broad network reach often shows up first as unexpected outbound connections to internal services the proxy has no legitimate reason to contact, or to external IP addresses at all.
Review API key usage patterns for anomalies
Since exploitation only required a valid low-privilege API key rather than administrator access, look for keys suddenly invoking MCP test endpoints when their historical usage pattern never touched MCP configuration functionality.
Validation: confirm your exposure before and after patching
Before patching, confirm whether your deployment is actually reachable and exploitable. Identify every LiteLLM proxy instance in your environment and record its exact running version against the 1.74.2 through 1.83.6 affected range. Confirm whether the MCP test endpoints are reachable by any API key holder, not only administrators, since the access control gap is what makes this exploitable by low-privilege callers. Separately verify your Starlette dependency version against CVE-2026-48710 to determine whether the unauthenticated RCE chain applies to your specific deployment. After patching, review historical access logs covering the period before the advisory's publication date for any of the request patterns described in the detection guidance above, since upgrading closes the vulnerability going forward but does not retroactively tell you whether it was already exploited against your environment.
Remediation and mitigation
This platform's persisted Respond actions for CVE-2026-42271 give the concrete remediation sequence, grounded in the confirmed exploitation status and the vendor's own fix:
Subscribe to unlock WAF Detection Rules
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Apply the official patch and verify a clean build
Upgrade every LiteLLM proxy instance to version 1.83.7 or later, then verify the running version on each host to confirm the upgrade actually took effect rather than assuming a deployment pipeline succeeded.
Isolate or restrict network access to unpatched systems
Because this vulnerability is confirmed exploited, any LiteLLM proxy that cannot be patched immediately should have its network exposure restricted now, not after the upgrade window closes. Remove public internet access to the proxy and limit reachability to only the internal services that genuinely require it.
Review EDR and SIEM telemetry across the exposure window
Examine logs and endpoint telemetry on affected systems covering the period before and after the advisory's publication date for the exploitation indicators described in the detection guidance above.
Apply CISA's KEV-linked remediation guidance
CISA's standard KEV catalog guidance for this entry directs organizations to apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable. That is CISA's generic KEV boilerplate rather than detail specific to this vulnerability, and it should be read as a floor, not a substitute for the version upgrade and Starlette dependency check described above.
Known limitations of this advisory
If your LiteLLM deployment is a fork, a repackaged build, or anything you can't cleanly map to the 1.74.2 through 1.83.6 range, don't rely on the version numbers in this article to clear yourself: check directly against BerriAI's GitHub repository and security advisory, since a downstream fork can lag or diverge from upstream version numbering. The vendor-specific detection content above is system-drafted, not independently vetted against a confirmed exploit sample; if you already run a SIEM correlation rule tuned to MCP test-endpoint traffic, prioritize reviewing that over the platform-native content. Exploitation confirmation traces to CISA's KEV catalog alone in this platform's data, and no threat actor, campaign, or affected-organization count has been published, so hold off on naming one in your own incident documentation until a primary source confirms it. Given how much access a LiteLLM proxy typically holds, every connected provider's API credentials and broad network reach, a version-mapping gap here is a reason to isolate the host now rather than wait for certainty, not a reason to deprioritize it. Readers evaluating build pipeline exposure more broadly may also find our piece on detecting supply chain compromise in software build pipelines useful context for the AI infrastructure layer this vulnerability sits in.
The bottom line
CVE-2026-42271 is a confirmed, actively exploited command injection vulnerability in LiteLLM's MCP test endpoints, affecting versions 1.74.2 through 1.83.6 and fixed in 1.83.7. CISA's KEV addition on June 8, 2026 means this is not a theoretical risk to plan around, it is a live one, and the demonstrated chain with CVE-2026-48710 into unauthenticated remote code execution raises the practical severity above the CVSS 8.8 base score for deployments with a vulnerable Starlette dependency. Given how central a LiteLLM proxy typically is to an organization's AI infrastructure, holding broad network reach and every connected provider's API credentials in one place, upgrading to 1.83.7, restricting network exposure on anything not yet patched, and reviewing telemetry across the exposure window are not optional follow-up items. They are the immediate response this advisory calls for.
This analysis is generic. create a free account to score threats like this against your own stack.
Frequently asked questions
What is CVE-2026-42271?
CVE-2026-42271 is a command injection vulnerability in BerriAI's LiteLLM AI gateway. Two MCP preview endpoints accept a stdio server configuration and execute the supplied command as a subprocess on the proxy host, and any valid API key, not just an administrator key, was enough to trigger it.
Which LiteLLM versions are affected by CVE-2026-42271?
LiteLLM versions 1.74.2 through 1.83.6 are affected, per BerriAI's GitHub Security Advisory GHSA-v4p8-mg3p-g94g. Version 1.83.7 and later contain the fix. Confirm your exact deployed version against the vendor repository if you run a fork or repackaged build.
Is CVE-2026-42271 being actively exploited?
Yes. CISA added it to its Known Exploited Vulnerabilities catalog on June 8, 2026, citing evidence of active exploitation. No threat actor or campaign has been publicly named, and the scope of affected organizations has not been disclosed.
How does CVE-2026-42271 relate to CVE-2026-48710?
Researchers at Horizon3.ai showed that CVE-2026-42271 can be chained with CVE-2026-48710, a Starlette Host header authentication bypass, to skip LiteLLM's authentication entirely and reach unauthenticated remote code execution. The combined chain carries a CVSS score of 10.0, higher than the CVSS 8.8 score for CVE-2026-42271 on its own.
Is CVE-2026-42271 the same issue as the MCP SDK design flaw covered elsewhere on this site?
No. The MCP SDK design flaw is a broad, unsanitized STDIO command execution default present in the official MCP SDK itself, affecting many downstream tools. CVE-2026-42271 is a specific implementation bug in LiteLLM's own MCP test endpoints that lack access control, a separate and more narrowly scoped issue even though both fall under AI infrastructure security.
What should security teams do right now about CVE-2026-42271?
Upgrade every LiteLLM proxy to version 1.83.7 or later and verify the upgrade took effect. For any instance that cannot be patched immediately, restrict network access since exploitation is confirmed. Also check your Starlette dependency version against CVE-2026-48710, and review EDR or SIEM telemetry for exploitation activity around the advisory's publication window.
Sources & references
Free resources
Critical CVE Reference Card 2025–2026
25 actively exploited vulnerabilities with CVSS scores, exploit status, and patch availability. Print it, pin it, share it with your SOC team.
Ransomware Incident Response Playbook
Step-by-step 24-hour IR checklist covering detection, containment, eradication, and recovery. Built for SOC teams, IR leads, and CISOs.
Get threat intel before your inbox does.
50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, daily, no spam.
Unsubscribe anytime. We never sell your data.

Founder & Cybersecurity Evangelist, Decryption Digest
Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals every morning.
