{"id":"CVE-2026-42271","published":"2026-05-08T04:16:21Z","modified":"2026-10-26T20:10:00Z","title":"BerriAI LiteLLM Command Injection Vulnerability","vendor":"BerriAI","product":"LiteLLM","tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"NVD"},"summary":{"text":"LiteLLM (by BerriAI) has a flaw in its MCP server preview endpoints, POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list, which accept a full stdio server configuration including command, args, and env fields. An authenticated attacker with any valid proxy API key, including low-privilege internal-user keys, can have the supplied command spawned as a subprocess on the proxy host with the proxy process's privileges, requiring only network access to the proxy and no user interaction or special configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:53:21Z"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"NVD"},"epss":{"score":0.91445,"percentile":0.99812,"date":"2026-10-30","provenance":"source"},"kev":{"dateAdded":"2026-06-08","dueDate":"2026-06-22","ransomware":false,"requiredAction":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","notes":"This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check with specific vendors for information on patching status. For more information, please see: https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g ; https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable ; https://nvd.nist.gov/vuln/detail/CVE-2026-42271","provenance":"source"},"vulncheckKev":{"dateAdded":"2026-06-08","exploitedFirstSeen":"2026-06-08","ransomware":true,"evidence":[{"url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","date":"2026-06-08"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-06&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-06"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-07&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-07"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-08&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-08"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-09&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-09"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-10&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-10"},{"url":"https://www.recordedfuture.com/blog/june-2026-cve-landscape","date":"2026-07-10"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-11&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-11"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-12&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-12"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2026-07-13&host_type=src&vulnerability=cve-2026-42271","date":"2026-07-13"}],"evidenceTotal":107,"provenance":"source"},"exploited":true,"otx":{"pulseCount":50,"pulses":[{"name":"Actively_Exploited_Kev | Oct 31, 2026","url":"https://otx.alienvault.com/pulse/6ae4aefab0c2191cecd41862","created":"2026-10-30"},{"name":"Actively_Exploited_Kev | Oct 30, 2026","url":"https://otx.alienvault.com/pulse/6ae35d889ea92b4ce19c2680","created":"2026-10-29"},{"name":"Actively_Exploited_Kev | Oct 29, 2026","url":"https://otx.alienvault.com/pulse/6ae20c1db17e7057ae7d9ad1","created":"2026-10-28"},{"name":"Actively_Exploited_Kev | Oct 28, 2026","url":"https://otx.alienvault.com/pulse/6ae0ba7e0e2a97ff7b218819","created":"2026-10-27"},{"name":"Actively_Exploited_Kev | Oct 27, 2026","url":"https://otx.alienvault.com/pulse/6adf68b85c3e852f3c111d18","created":"2026-10-26"},{"name":"Actively_Exploited_Kev | Oct 24, 2026","url":"https://otx.alienvault.com/pulse/6adb740e397c3ad4799aa4cd","created":"2026-10-23"},{"name":"Actively_Exploited_Kev | Oct 23, 2026","url":"https://otx.alienvault.com/pulse/6ada236fcfba2dfa730ea482","created":"2026-10-22"},{"name":"Actively_Exploited_Kev | Oct 22, 2026","url":"https://otx.alienvault.com/pulse/6ad8d33a077cbb5cab524d80","created":"2026-10-21"},{"name":"Actively_Exploited_Kev | Oct 21, 2026","url":"https://otx.alienvault.com/pulse/6ad78130c4d1ac2be83a8b6d","created":"2026-10-20"},{"name":"Actively_Exploited_Kev | Oct 20, 2026","url":"https://otx.alienvault.com/pulse/6ad62f63c24a405a3423cc13","created":"2026-10-19"}],"provenance":"machine"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable","tags":["Product","Release Notes"]},{"url":"https://github.com/BerriAI/litellm/security/advisories/GHSA-v4p8-mg3p-g94g","tags":["Mitigation","Patch","Vendor Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:27784","tags":["Third Party Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28960","tags":["Third Party Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2026:30056","tags":["Third Party Advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42271","tags":["Third Party Advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2467924","tags":["Third Party Advisory"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42271.json","tags":["Third Party Advisory"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-42271","tags":["US Government Resource"]}],"techniques":[{"id":"T1190","name":"Exploit Public-Facing Application","tactics":["initial-access"],"provenance":"ai","basis":"ai-mapping","bases":["ai-mapping"],"basisDetail":"claude-haiku-5-5: Exploited via exposed HTTP API endpoints","mappingType":"exploitation_technique","evidence":[{"from":"description","quote":"POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list","start":195,"end":260}],"model":"claude-haiku-5-5","confidence":"medium","confidenceNote":"AI-mapped from the description (quote-validated, not expert-reviewed)"},{"id":"T1059","name":"Command and Scripting Interpreter","tactics":["execution"],"provenance":"ai","basis":"ai-mapping","bases":["ai-mapping"],"basisDetail":"claude-haiku-5-5: Arbitrary command execution on proxy host","mappingType":"primary_impact","evidence":[{"from":"description","quote":"the endpoints attempted to connect, which spawned the supplied command as a subprocess","start":434,"end":520}],"model":"claude-haiku-5-5","confidence":"medium","confidenceNote":"AI-mapped from the description (quote-validated, not expert-reviewed)"}],"reports":[],"affected":[{"ecosystem":"PyPI","package":"litellm","vulnerableRanges":[">=1.74.2, <1.83.7"],"patched":["1.83.7"],"from":["GHSA-v4p8-mg3p-g94g","PYSEC-2026-2599"],"provenance":"source"}],"advisories":[{"id":"GHSA-v4p8-mg3p-g94g","url":"https://github.com/advisories/GHSA-v4p8-mg3p-g94g","severity":"HIGH","ecosystem":"PyPI","package":"litellm","vulnerableRanges":[">=1.74.2, <1.83.7"],"patched":["1.83.7"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2026-28507","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-28507","exploited":true,"exploitedSince":"2026-06-08","provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2026-05-20","earliestUrl":"https://github.com/learner202649/CVE-2026-42271-PoC","repos":[{"name":"learner202649/CVE-2026-42271-PoC","url":"https://github.com/learner202649/CVE-2026-42271-PoC","stars":1,"created":"2026-05-20"},{"name":"HORKimhab/CVE-2026-42271","url":"https://github.com/HORKimhab/CVE-2026-42271","stars":0,"created":"2026-06-09"}]},"metasploit":[{"name":"BerriAI LiteLLM Proxy MCP Test Endpoint Command Execution","module":"exploit/multi/http/litellm_mcp_test_cmd_injection","type":"exploit","disclosureDate":"2026-04-21","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/litellm_mcp_test_cmd_injection.rb"}],"nuclei":[{"id":"CVE-2026-42271","name":"LiteLLM - Command Injection","severity":"critical","path":"http/cves/2026/CVE-2026-42271.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-42271.yaml"}],"first":{"date":"2026-04-21","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/litellm_mcp_test_cmd_injection.rb"},"provenance":"source"},"exploitRefs":[],"flow":[{"stage":"exploitation","techniques":["T1190"],"provenance":"ai"},{"stage":"primary","techniques":["T1059"],"provenance":"ai"}],"timeline":[{"date":"2026-04-21","kind":"exploit-public","label":"First public exploit: Metasploit; later: PoC-in-GitHub 2026-05-20","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/litellm_mcp_test_cmd_injection.rb","provenance":"source"},{"date":"2026-05-08","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42271","provenance":"source"},{"date":"2026-06-08","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","provenance":"source"},{"date":"2026-06-08","kind":"kev","label":"Added to CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","provenance":"source"},{"date":"2026-06-08","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-28507","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":31},"priority":{"score":84.1,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in CISA KEV and VulnCheck KEV"},{"name":"Recent KEV listing","points":5.0,"detail":"added 145 days ago"},{"name":"Known ransomware use","points":10.0,"detail":"CISA KEV and VulnCheck KEV: Known"},{"name":"EPSS percentile","points":19.96,"detail":"percentile 0.9981"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"2 PoC-in-GitHub repos; 1 Metasploit module; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":3.0,"detail":"50 pulses"},{"name":"CVSS severity","points":6.16,"detail":"base score 8.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}