LiteLLM: Authenticated command execution via MCP stdio test endpoints (CVE-2026-42271)
Published Last modified In CISA KEV since Sources: BSI, CVE.org, pwn.watch, OSV, EUVD
- Actively exploited
- Source: VulnCheck KEV (opens in a new tab), CIRCL Sightings How we classify
- Public exploit
What is affected, what to do
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.74.2 to before version 1.83.7, two endpoints used to preview an MCP server before saving it — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list — accepted a full server configuration in the request body, including the command, args, and env fields used by the stdio transport.
The vulnerability is being actively exploited; treat it as a priority. Update litellm to version 1.83.7, openshift_ai to version 3.3.4, LiteLLM to version 1.83.7. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- BerriAI LiteLLM
gte 1.74.2, < 1.83.7..*
- BerriAI LiteLLM
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
8.8
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
8.8
CVSS v3
Severity High on the scale from 0 to 10.
Source: BSI, CVE.org, pwn.watch, OSV, EUVD
91.4 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.81
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 240.92 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploitedSource: VulnCheck KEV (opens in a new tab), CIRCL Sightings How we classify
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 8.8 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 8.8
CVSS v4
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 8.7
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 91.4 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.81
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossaryCWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-77, CWE-78, CWE-78
Response and mitigation
Why act now?
Prioritisation rationale
This flaw is network-reachable with low complexity and requires only a valid API key of any privilege level. It yields full command execution on the gateway host. Exploitation likelihood is among the highest of all tracked CVEs, and a single POST carrying a stdio configuration is enough to trigger it. CISA has not flagged ransomware use. However, AI gateways concentrate high-value secrets — provider keys, database credentials and cloud tokens — which makes them prime targets for credential theft, LLM cost abuse and lateral movement. Organisations that distribute keys widely to developers, business units or tenants, or that expose the gateway externally, should treat this as an emergency patch within 24 hours. Internal-only instances with a handful of admin keys still warrant prompt patching, but can follow the exposed systems.
Runbook step 1
Immediate response (0-24 h)
- Patch: Upgrade LiteLLM to 1.83.7 or later (
pip install --upgrade "litellm>=1.83.7"or redeploy the current container image). All versions from 1.74.2 up to, but not including, 1.83.7 are affected. Move Red Hat OpenShift AI to 2.25.8 or 3.3.4. The context lists no fixed release for the 3.4 stream — check the Red Hat advisory. - Block the vulnerable endpoints now: At the reverse proxy, ingress or WAF, return 403 for
POST /mcp-rest/test/connectionandPOST /mcp-rest/test/tools/listuntil the patch is verified. These endpoints only preview an MCP server before it is saved, so blocking them has minimal operational impact. - Scope your exposure: Inventory every LiteLLM proxy instance, prioritising internet-facing gateways and those reachable from broad internal networks. Confirm the listening port per deployment and temporarily restrict access to known application subnets.
- Rotate credentials if compromise cannot be ruled out: Injected commands run as the proxy process and can read its environment. Treat the following as exposed:
- the LiteLLM master key
- all virtual keys
- upstream LLM provider keys (OpenAI, Azure, Anthropic, Bedrock, etc.)
DATABASE_URLand database credentials- cloud role tokens available to the host or pod
- Prune keys: Revoke unused internal-user and team keys. Any valid key is sufficient to exploit this, including low-privilege ones.
- Preserve evidence: Capture proxy access logs, container logs and the process list before restarting. Isolate suspect pods or hosts rather than simply recycling them.
- Patch: Upgrade LiteLLM to 1.83.7 or later (
Runbook step 2
Mitigation layers
- Network segmentation: Place the gateway in a dedicated segment.
- Ingress: allow only application servers.
- Egress: allow only the allowlisted LLM provider endpoints, which blunts reverse shells, tool staging and exfiltration.
- WAF/reverse-proxy rule: Deny
/mcp-rest/test/*. Additionally inspect JSON bodies for"transport":"stdio"or for the"command","args"and"env"fields. Example for nginx:location ~ ^/mcp-rest/test/ { return 403; }. - IAM/least privilege: Minimise key issuance and never ship proxy keys to end-user clients or browser frontends. Enforce short expiry and budget or model scopes. Expose the admin UI and API only to the management network.
- Container and endpoint hardening:
- run the proxy as non-root
- set
readOnlyRootFilesystem: trueandallowPrivilegeEscalation: false - drop all capabilities and apply a restrictive seccomp profile
- where feasible, use a minimal or distroless image without a shell,
curlorwget
- Secrets handling: Pull provider keys from a secrets manager rather than static environment variables. Restrict cloud metadata access from the pod (IMDSv2 with hop limit 1) to stop pivoting into the cloud control plane.
- Network segmentation: Place the gateway in a dedicated segment.
Runbook step 3
Detection rules
- Proxy/web access logs: Alert on any
POSTto/mcp-rest/test/connectionor/mcp-rest/test/tools/list, especially from non-admin keys. Example in SPL:index=proxy uri_path IN ("/mcp-rest/test/connection","/mcp-rest/test/tools/list") method=POST | stats count by src_ip, user, api_key_alias - EDR process ancestry: Flag the LiteLLM python, uvicorn or gunicorn process spawning
sh,bash,curl,wget,nc,python -c,base64orchmod. Example in KQL:DeviceProcessEvents | where InitiatingProcessCommandLine has "litellm" and FileName in~ ("sh","bash","curl","wget","nc","ncat","base64") - Linux auditd / Sysmon for Linux (EID 1): Detect
execveevents whose parent is the proxy process. Sigma shape:ParentImage|endswith: '/python3'plusParentCommandLine|contains: 'litellm'plusImage|endswith: ['/sh','/bash','/curl','/wget']. Also watch for injectedenvvalues such asLD_PRELOADorPYTHONPATHin child processes. - Network telemetry (Zeek/Suricata): Detect outbound connections from the gateway to destinations outside the LLM provider allowlist, new long-lived TCP sessions, or DNS lookups for unfamiliar domains shortly after a
/mcp-rest/test/request. - Kubernetes/container runtime (Falco): Review "Terminal shell in container" and "Unexpected outbound connection" hits on LiteLLM pods. Unexpected writes to
/tmpor to the image filesystem are a further indicator.
- Proxy/web access logs: Alert on any
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.74.2 to before version 1.83.7, two endpoints used to preview an MCP server before saving it — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list — accepted a full server configuration in the request body, including the command, args, and env fields used by the stdio transport. When called with a stdio configuration, the endpoints attempted to connect, which spawned the supplied command as a subprocess on the proxy host with the privileges of the proxy process. The endpoints were gated only by a valid proxy API key, with no role check. Any authenticated user — including holders of low-privilege internal-user keys — could therefore run arbitrary commands on the host. This issue has been patched in version 1.83.7.
Source: BSI WID Portal, BSI CSAF, NVD (NIST), pwn.watch, CISA KEV Catalog, cvelistv5, CVE.org (MITRE), OSV (Open Source Vulnerabilities), ENISA EUVD
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| BerriAI | litellm |
|
|
| litellm | litellm |
|
|
| redhat | openshift_ai |
|
|
| Open Source | LiteLLM |
|
|
| pypi | litellm |
|
|
Vendors and products
Weakness classes (CWE)
CWE-77Improper Neutralization of Special Elements used in a Command ('Command Injection')
Class
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Entry at MITRE CWE-77CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Base
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Entry at MITRE CWE-78CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Base
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Entry at MITRE CWE-78
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited | |
| PoC-in-GitHub (nomi-sec) | CVE-2026-42271-LiteLLM-RCE (opens in a new tab)github.com | PoC (publicly reported)reported, not verified | |
| PoC-in-GitHub (nomi-sec) | CVE-2026-42271 (opens in a new tab)github.com | PoC (publicly reported)reported, not verified | |
| PoC-in-GitHub (nomi-sec) | CVE-2026-42271-PoC (opens in a new tab)github.com | PoC (publicly reported)reported, not verified |
References & sources
- github.comBerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94gweb, x_refsource_CONFIRM, pwn-watch, Mitigation, Patch, Vendor advisory
- NVD (NIST)NVD: CVE-2026-42271advisory, pwn-watch
- github.comBerriAI/litellmpackage
- github.comBerriAI/litellm/releases/tag/v1.83.7-stableweb, x_refsource_MISC, Product, Release notes
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271web, government-resource, US government resource
- pypi.orgproject/litellmpackage
- GitHub Security Advisoriesadvisories/GHSA-v4p8-mg3p-g94gadvisory
- access.redhat.comsecurity/cve/CVE-2026-42271Vulnerability database, x_refsource_REDHAT, Third-party advisory
- bugzilla.redhat.comRHBZ#2467924Issue tracking, x_refsource_REDHAT, Third-party advisory
- security.access.redhat.comdata/csaf/v2/vex/2026/cve-2026-42271.jsonx_sadp-csaf-vex, Third-party advisory
- access.redhat.comerrata/RHSA-2026:28960Vendor advisory, x_refsource_REDHAT, Third-party advisory
- access.redhat.comerrata/RHSA-2026:30056Vendor advisory, x_refsource_REDHAT, Third-party advisory
- access.redhat.comerrata/RHSA-2026:27784Vendor advisory, x_refsource_REDHAT, Third-party advisory
- pwn.watchpwn.watch: BerriAI LiteLLM: BerriAI LiteLLM Command Injection Vulnerabilitypwn-watch
- github.comKludex Starlette — CVE-2026-48710pwn-watch
- NVD (NIST)NVD: CVE-2026-48710pwn-watch
- cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch
Changes to this CVE
Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).
NVD analysis modifiedNVD
Newly listed as affected:- Red Hat OpenShift AI (RHOAI) (2.25 – before 2.25.8; 3.3 – before 3.3.4; 1 individual version)
Show 7 original changes
Individual changes of this event as published by NVD Type Action Before After Product configuration added —OR *cpe:2.3:a:redhat:openshift_ai:*:*:*:*:*:*:*:* versions from (including) 2.25 up to (excluding) 2.25.8 *cpe:2.3:a:redhat:openshift_ai:*:*:*:*:*:*:*:* versions from (including) 3.3 up to (excluding) 3.3.4 *cpe:2.3:a:redhat:openshift_ai:3.4:*:*:*:*:*:*:*Reference type added —redhat-SADP: https://access.redhat.com/errata/RHSA-2026:27784 Types: Third Party AdvisoryReference type added —redhat-SADP: https://access.redhat.com/errata/RHSA-2026:28960 Types: Third Party AdvisoryReference type added —redhat-SADP: https://access.redhat.com/errata/RHSA-2026:30056 Types: Third Party AdvisoryReference type added —redhat-SADP: https://access.redhat.com/security/cve/CVE-2026-42271 Types: Third Party AdvisoryReference type added —redhat-SADP: https://bugzilla.redhat.com/show_bug.cgi?id=2467924 Types: Third Party AdvisoryReference type added —redhat-SADP: https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json Types: Third Party AdvisorySource identifier: nvd@nist.gov
CISA KEV entry updated9119a7d8…
4 individual changes: Date Added, Due Date, Required Action, Vulnerability Name
Show 4 original changes
Individual changes of this event as published by NVD Type Action Before After Date Added added —2026-06-08Due Date added —2026-06-08Required Action added —2026-06-08Vulnerability Name added —2026-06-08Source identifier: 9119a7d8-5eab-497f-8521-727c672e3725
Record modifiedCISA ADP
Show the original change
Individual changes of this event as published by NVD Type Action Before After Reference added —https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0
One NVD translation into another language is hidden.
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2026-42271"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-42271.svg?lang=en" alt="CVE-2026-42271 – NEOSEC Intel" height="20"></a>