{"id":"CVE-2026-42271","aliases":["EUVD-2026-28507","GHSA-v4p8-mg3p-g94g","PYSEC-2026-2599"],"status":"published","title":"LiteLLM: Authenticated command execution via MCP stdio test endpoints","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.","severity":{"version":"4.0","score":8.7,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.91445,"percentile":0.99814,"model":"v2026.06.15"},"facts":{"in_kev":true,"known_exploited":true,"public_exploit":true,"fix_available":true},"cwes":["CWE-77","CWE-78"],"published":"2026-04-25T23:27:54Z","modified":"2026-10-28T02:30:29Z","kev":{"date_added":"2026-06-08","due_date":"2026-06-22","required_action":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","known_ransomware_use":"Unknown"},"exploitation":[{"source":"euvd","since":"2026-06-08"},{"source":"kev","since":"2026-06-08"}],"exploits":[{"source":"metasploit","id":"exploit/multi/http/litellm_mcp_test_cmd_injection","title":"BerriAI LiteLLM Proxy MCP Test Endpoint Command Execution","type":"exploit","platform":"Unix","date":"2026-04-21","verified":true,"url":"https://www.rapid7.com/db/modules/exploit/multi/http/litellm_mcp_test_cmd_injection"},{"source":"pocgithub","id":"learner202649/CVE-2026-42271-PoC","title":"learner202649/CVE-2026-42271-PoC","date":"2026-05-20","url":"https://github.com/learner202649/CVE-2026-42271-PoC"},{"source":"pocgithub","id":"HORKimhab/CVE-2026-42271","title":"HORKimhab/CVE-2026-42271","date":"2026-06-09","url":"https://github.com/HORKimhab/CVE-2026-42271"},{"source":"nuclei","id":"CVE-2026-42271","title":"LiteLLM - Command Injection","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-42271.yaml"}],"fixes":[{"ecosystem":"PyPI","package":"litellm","fixed_in":["1.83.7"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"litellm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.74.2"},{"fixed":"1.83.7"}]}]},{"source":"osv","ecosystem":"PyPI","package":"litellm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.74.2"},{"fixed":"1.83.7"}]}],"versions":["1.74.12","1.74.14","1.74.15","1.74.15.post1","1.74.15.post2","1.74.2","1.74.3","1.74.3.post1","1.74.3rc1","1.74.3rc2","1.74.3rc3","1.74.4","1.74.4.dev1","1.74.6","1.74.7","1.74.7.post1","1.74.7.post2","1.74.7rc1","1.74.8","1.74.8.dev2","1.74.9","1.74.9.dev1","1.74.9.dev2","1.74.9.post1","1.74.9.post2","1.75.0","1.75.2","1.75.3","1.75.4","1.75.5.post1","1.75.5.post2","1.75.6","1.75.7","1.75.8","1.75.9","1.76.0","1.76.1","1.76.2","1.76.3","1.77.0","1.77.1","1.77.2.post1","1.77.3","1.77.4","1.77.4.dev1","1.77.5","1.77.7","1.78.0","1.78.0rc2","1.78.2","1.78.3","1.78.4","1.78.5","1.78.6","1.78.7","1.79.0","1.79.0.dev1","1.79.0.dev2","1.79.0.dev3","1.79.1","1.79.2","1.79.3","1.79.3.dev8","1.80.0","1.80.10","1.80.11","1.80.12","1.80.13","1.80.15","1.80.16","1.80.17","1.80.5","1.80.6","1.80.7","1.80.8","1.80.9","1.81.0","1.81.1","1.81.10","1.81.11","1.81.12","1.81.13","1.81.14","1.81.15","1.81.16","1.81.3","1.81.4","1.81.5","1.81.6","1.81.7","1.81.8","1.81.9","1.81.9.dev1","1.82.0","1.82.1","1.82.2","1.82.3","1.82.4","1.82.5","1.82.6","1.83.0","1.83.1","1.83.2","1.83.3","1.83.4","1.83.5","1.83.6"]},{"source":"osv","ecosystem":"PyPI","package":"litellm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.74.2"},{"fixed":"1.83.7"}]}],"versions":["1.74.12","1.74.14","1.74.15","1.74.15.post1","1.74.15.post2","1.74.2","1.74.3","1.74.3.post1","1.74.3rc1","1.74.3rc2","1.74.3rc3","1.74.4","1.74.4.dev1","1.74.6","1.74.7","1.74.7.post1","1.74.7.post2","1.74.7rc1","1.74.8","1.74.8.dev2","1.74.9","1.74.9.dev1","1.74.9.dev2","1.74.9.post1","1.74.9.post2","1.75.0","1.75.2","1.75.3","1.75.4","1.75.5.post1","1.75.5.post2","1.75.6","1.75.7","1.75.8","1.75.9","1.76.0","1.76.1","1.76.2","1.76.3","1.77.0","1.77.1","1.77.2.post1","1.77.3","1.77.4","1.77.4.dev1","1.77.5","1.77.7","1.78.0","1.78.0rc2","1.78.2","1.78.3","1.78.4","1.78.5","1.78.6","1.78.7","1.79.0","1.79.0.dev1","1.79.0.dev2","1.79.0.dev3","1.79.1","1.79.2","1.79.3","1.79.3.dev8","1.80.0","1.80.10","1.80.11","1.80.12","1.80.13","1.80.15","1.80.16","1.80.17","1.80.5","1.80.6","1.80.7","1.80.8","1.80.9","1.81.0","1.81.1","1.81.10","1.81.11","1.81.12","1.81.13","1.81.14","1.81.15","1.81.16","1.81.3","1.81.4","1.81.5","1.81.6","1.81.7","1.81.8","1.81.9","1.81.9.dev1","1.82.0","1.82.1","1.82.2","1.82.3","1.82.4","1.82.5","1.82.6","1.83.0","1.83.1","1.83.2","1.83.3","1.83.4","1.83.5","1.83.6"]}],"products":[{"vendor":"berriai","product":"litellm"},{"vendor":"litellm","product":"litellm"},{"vendor":"red hat","product":"exploit intelligence"},{"vendor":"red hat","product":"red hat ansible automation platform 2"},{"vendor":"red hat","product":"red hat openshift ai (rhoai)"},{"vendor":"red hat","product":"red hat openshift ai 2.25"},{"vendor":"red hat","product":"red hat openshift ai 3.3"},{"vendor":"red hat","product":"red hat openshift ai 3.4"},{"vendor":"redhat","product":"openshift_ai"}],"references":[{"url":"https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g","tags":["x_refsource_CONFIRM","Mitigation","Patch","Vendor Advisory","advisory","web"]},{"url":"https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable","tags":["x_refsource_MISC","Product","Release Notes","web"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271","tags":["government-resource","US Government Resource","web"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42271","tags":["vdb-entry","x_refsource_REDHAT","Third Party Advisory","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2467924","tags":["issue-tracking","x_refsource_REDHAT","Third Party Advisory","report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json","tags":["x_sadp-csaf-vex","Third Party Advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28960","tags":["vendor-advisory","x_refsource_REDHAT","Third Party Advisory","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:30056","tags":["vendor-advisory","x_refsource_REDHAT","Third Party Advisory","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27784","tags":["vendor-advisory","x_refsource_REDHAT","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42271","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-v4p8-mg3p-g94g","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42271.json","tags":["advisory"]},{"url":"https://github.com/BerriAI/litellm","tags":["package"]},{"url":"https://pypi.org/project/litellm","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-42271","title":"LiteLLM: Authenticated command execution via MCP stdio test endpoints","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.","status":"published","published":"2026-05-08T03:35:16.758Z","modified":"2026-07-15T00:57:49.325Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high","assessor":"cna"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-77","CWE-78","CWE-78"],"updated_at":"2026-11-02T13:40:35.004553Z"}],"euvd":[{"id":"EUVD-2026-28507","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.","status":"published","published":"2026-05-08T03:35:16Z","modified":"2026-07-15T00:57:49Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"}],"exploited_since":"2026-06-08","updated_at":"2026-11-02T18:19:56.918546Z"}],"ghsa":[{"id":"GHSA-v4p8-mg3p-g94g","title":"LiteLLM: Authenticated command execution via MCP stdio test endpoints","description":"### Impact\n\nTwo 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.\n\nThe 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.\n\n### Patches\n\nFixed in **`1.83.7`**. Both test endpoints now require the `PROXY_ADMIN` role, bringing them into line with the save endpoint.\n\n### Workarounds\n\nIf upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway.","status":"published","published":"2026-04-25T23:27:54Z","modified":"2026-06-09T13:07:08Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T14:40:24.856614Z"}],"kev":[{"id":"CVE-2026-42271","title":"BerriAI LiteLLM Command Injection Vulnerability","description":"BerriAI LiteLLM contains a command injection vulnerability that could allow any authenticated user, including holders of low-privilege internal-user keys, to run arbitrary commands on the host.","cwes":["CWE-78","CWE-77"],"kev":{"date_added":"2026-06-08","due_date":"2026-06-22","required_action":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","known_ransomware_use":"Unknown"},"updated_at":"2026-11-02T17:00:15.999436Z"}],"nvd":[{"id":"CVE-2026-42271","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.","status":"published","published":"2026-05-08T04:16:21.82Z","modified":"2026-10-26T20:10:00.16Z","cvss":[{"version":"4.0","score":8.7,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T14:12:17.842772Z"}],"osv":[{"id":"CVE-2026-42271","title":"LiteLLM: Authenticated command execution via MCP stdio test endpoints","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.","status":"published","published":"2026-05-08T03:35:16.758Z","modified":"2026-10-28T02:30:29.02853761Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T15:45:04.117819Z"},{"id":"GHSA-v4p8-mg3p-g94g","title":"LiteLLM: Authenticated command execution via MCP stdio test endpoints","description":"### Impact\n\nTwo 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.\n\nThe 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.\n\n### Patches\n\nFixed in **`1.83.7`**. Both test endpoints now require the `PROXY_ADMIN` role, bringing them into line with the save endpoint.\n\n### Workarounds\n\nIf upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway.","status":"published","published":"2026-04-25T23:27:54Z","modified":"2026-09-10T03:51:03.195872876Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":8.7,"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","level":"high"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T15:46:56.639206Z"},{"id":"PYSEC-2026-2599","title":"LiteLLM: Authenticated command execution via MCP stdio test endpoints","description":"### Impact\n\nTwo 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.\n\nThe 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.\n\n### Patches\n\nFixed in **`1.83.7`**. Both test endpoints now require the `PROXY_ADMIN` role, bringing them into line with the save endpoint.\n\n### Workarounds\n\nIf upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway.","status":"published","published":"2026-07-13T15:02:53.54133Z","modified":"2026-07-13T16:32:04.086728418Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":8.7,"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","level":"high"}],"updated_at":"2026-11-02T15:52:55.961245Z"}]}}
