# CVE-2026-42271: LiteLLM: Authenticated command execution via MCP stdio test endpoints

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.7
- **CVSS:** 8.7 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: Low; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: High; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Yes: in CISA KEV since 2026-06-08; federal due date 2026-06-22
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 7.31% (percentile 95, 2026-11-26)
- **CWE:** CWE-77, CWE-78
- **Aliases:** GHSA-v4p8-mg3p-g94g, PYSEC-2026-2599
- **Published:** 2026-04-25T23:27:54.000Z
- **Modified:** 2026-10-26T20:10:00.160Z

## Who should check

- Projects that depend on PyPI package litellm (\>= 1.74.2, \< 1.83.7)
- Anyone running BerriAI litellm \>= 1.74.2, \< 1.83.7

## 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.

## Affected and fixed versions

- PyPI `litellm`: affected \>= 1.74.2, \< 1.83.7; fixed 1.83.7 (osv)
- BerriAI litellm: \>= 1.74.2, \< 1.83.7 (cvelist)

## Mitigation

- Upgrade litellm to 1.83.7 or later.

## Timeline

- 2026-04-25: Published
- 2026-06-08: Added to CISA KEV (exploited in the wild)
- 2026-06-22: CISA remediation due date for US federal agencies
- 2026-10-26: Last modified

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-42271. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-42271.md
Affected: litellm >= 1.74.2, < 1.83.7
Fixed in: 1.83.7

Steps:
1. Search this machine and project for litellm (PyPI), BerriAI litellm: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-42271 being exploited?

Yes. CISA lists CVE-2026-42271 in its Known Exploited Vulnerabilities catalog since 2026-06-08, which means attacks have been seen. No public exploit code is known. EPSS estimates a 7.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-42271?

High: CVSS 8.7 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-42271?

litellm \>= 1.74.2, \< 1.83.7.

### Is there a fix for CVE-2026-42271?

Yes. Fixed in 1.83.7. Upgrade litellm to 1.83.7 or later.

### How do I check if I'm affected by CVE-2026-42271?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g>
- vendor: <https://access.redhat.com/errata/RHSA-2026:28960>
- vendor: <https://access.redhat.com/errata/RHSA-2026:30056>
- vendor: <https://access.redhat.com/errata/RHSA-2026:27784>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-42271>
- vendor: <https://github.com/advisories/GHSA-v4p8-mg3p-g94g>
- other: <https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271>
- other: <https://access.redhat.com/security/cve/CVE-2026-42271>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2467924>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json>
- other: <https://github.com/BerriAI/litellm>
- other: <https://pypi.org/project/litellm>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-42271>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-v4p8-mg3p-g94g> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-2599> (license: <https://creativecommons.org/licenses/by/4.0/>)
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

HTML: <https://flawdb.com/CVE-2026-42271> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-42271>
