<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Litellm — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/litellm/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Sat, 11 Apr 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/litellm/feed.xml" rel="self" type="application/rss+xml"/><item><title>LiteLLM Remote Code Execution via Bytecode Rewriting (CVE-2026-40217)</title><link>https://feed.craftedsignal.io/briefs/2026-04-litellm-rce/</link><pubDate>Sat, 11 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-litellm-rce/</guid><description>LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI, potentially leading to complete system compromise.</description><content:encoded><![CDATA[<p>LiteLLM, a library for simplifying interactions with Large Language Models (LLMs), is vulnerable to remote code execution (RCE) through version 2026-04-08. The vulnerability, identified as CVE-2026-40217, exists due to insufficient input validation at the <code>/guardrails/test_custom_code</code> URI. A remote attacker can exploit this flaw by rewriting bytecode, effectively injecting and executing arbitrary code on the server hosting LiteLLM. This vulnerability poses a significant risk, as it allows unauthenticated attackers with network access to the affected server to gain complete control.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies a LiteLLM instance running a vulnerable version (&lt;= 2026-04-08) with the <code>/guardrails/test_custom_code</code> endpoint exposed.</li>
<li>The attacker crafts a malicious HTTP request targeting the <code>/guardrails/test_custom_code</code> URI.</li>
<li>The malicious request includes specially crafted data designed to rewrite the bytecode executed by the LiteLLM instance.</li>
<li>The LiteLLM application, due to the vulnerability, processes the attacker-supplied data without proper sanitization or validation.</li>
<li>The application rewrites its own bytecode based on the attacker&rsquo;s input.</li>
<li>The rewritten bytecode contains malicious code injected by the attacker.</li>
<li>The application executes the rewritten bytecode, effectively executing the attacker&rsquo;s injected code.</li>
<li>The attacker gains arbitrary code execution on the server, allowing them to compromise the system, install malware, or exfiltrate data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-40217 allows unauthenticated remote attackers to execute arbitrary code on systems running vulnerable versions of LiteLLM. This can lead to complete system compromise, including data theft, ransomware deployment, and denial of service. The vulnerability could affect any organization utilizing LiteLLM for LLM interaction, particularly those exposing the vulnerable endpoint to untrusted networks. The impact is rated as critical due to the ease of exploitation and the potential for widespread damage.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the necessary patches or upgrade to a version of LiteLLM that addresses CVE-2026-40217 immediately.</li>
<li>Implement network segmentation to restrict access to the <code>/guardrails/test_custom_code</code> endpoint, as referenced in the vulnerability description.</li>
<li>Deploy the provided Sigma rule <code>Detect LiteLLM Bytecode Rewrite Attempt</code> to identify potential exploitation attempts targeting the vulnerable endpoint.</li>
<li>Monitor web server logs for suspicious POST requests to the <code>/guardrails/test_custom_code</code> URI, using the log source specified in the Sigma rule.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>CVE-2026-40217</category><category>litellm</category><category>rce</category><category>bytecode-rewriting</category></item><item><title>LiteLLM Authentication Bypass via Password Hash Exposure and Pass-the-Hash</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-litellm-auth-bypass/</link><pubDate>Wed, 08 Apr 2026 00:04:12 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-litellm-auth-bypass/</guid><description>LiteLLM versions before 1.83.0 stored user passwords as unsalted SHA-256 hashes and exposed these hashes through multiple API endpoints, enabling an authenticated user to retrieve another user's password hash and use it to log in as that user due to the /v2/login endpoint accepting the raw SHA-256 hash without re-hashing, leading to potential privilege escalation.</description><content:encoded><![CDATA[<p>LiteLLM versions prior to 1.83.0 are vulnerable to an authentication bypass vulnerability. User passwords are stored as unsalted SHA-256 hashes, a weak cryptographic practice that makes them susceptible to rainbow table attacks. Furthermore, these password hashes are exposed through several API endpoints, including <code>/user/info</code>, <code>/user/update</code>, and <code>/spend/users</code>, allowing any authenticated user to retrieve them. The <code>/v2/login</code> endpoint also accepts the raw SHA-256 hash as a valid password without proper re-hashing. This combination of vulnerabilities allows an attacker with low-level access to escalate privileges by obtaining another user&rsquo;s password hash and using it to directly log in as that user. Defenders should upgrade to version 1.83.0 or later to mitigate this vulnerability.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains initial access to LiteLLM and authenticates as a low-privilege user.</li>
<li>Attacker sends a request to <code>/user/info</code> to retrieve the password hash of another user.</li>
<li>The API responds with the target user&rsquo;s SHA-256 password hash.</li>
<li>Attacker sends a POST request to the <code>/v2/login</code> endpoint using the stolen SHA-256 hash as the password.</li>
<li>The <code>/v2/login</code> endpoint accepts the raw SHA-256 hash without re-hashing.</li>
<li>The server authenticates the attacker as the target user.</li>
<li>Attacker now has the privileges of the target user, potentially gaining access to sensitive data or administrative functions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability leads to unauthorized access and privilege escalation within the LiteLLM application. An attacker can impersonate other users, including administrators, potentially leading to data breaches, system compromise, and unauthorized modifications. The number of victims depends on the deployment size, but any LiteLLM instance running a version prior to 1.83.0 is vulnerable. Sectors utilizing LiteLLM are at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade LiteLLM to version 1.83.0 or later to patch the vulnerability (reference: Patches section).</li>
<li>Deploy the Sigma rule &ldquo;Detect LiteLLM User Info Hash Access&rdquo; to monitor for unauthorized access to user password hashes via the <code>/user/info</code> endpoint (reference: rule: &ldquo;Detect LiteLLM User Info Hash Access&rdquo;).</li>
<li>Deploy the Sigma rule &ldquo;Detect LiteLLM Login with SHA256 Hash&rdquo; to detect login attempts using SHA256 hashes (reference: rule: &ldquo;Detect LiteLLM Login with SHA256 Hash&rdquo;).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>litellm</category><category>authentication-bypass</category><category>credential-access</category><category>privilege-escalation</category></item><item><title>Compromised Litellm PyPI Package Versions</title><link>https://feed.craftedsignal.io/briefs/2024-01-litellm-compromise/</link><pubDate>Tue, 24 Mar 2026 12:12:58 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-litellm-compromise/</guid><description>Versions 1.82.7 and 1.82.8 of the Litellm package on PyPI were compromised in a supply chain attack, potentially impacting numerous users, with recommendations to avoid updating to these versions.</description><content:encoded><![CDATA[<p>On March 24, 2026, versions 1.82.7 and 1.82.8 of the Litellm package, available on the Python Package Index (PyPI), were reported as compromised. This supply chain attack potentially affects thousands of users who may have updated to the malicious versions. The compromised packages could contain malicious code injected by an unknown threat actor. Users are advised to avoid updating to these versions and investigate their systems for potential compromise. The initial report came from a Reddit post and links to a blog post for further details.</p>
<h2 id="attack-chain">Attack Chain</h2>
<p>While the specifics of the attack chain are not fully detailed in the source, a typical supply chain attack targeting PyPI packages involves the following steps:</p>
<ol>
<li><strong>Package Compromise:</strong> Threat actor gains unauthorized access to the Litellm PyPI account or the build environment.</li>
<li><strong>Malicious Code Injection:</strong> The attacker injects malicious code into the setup.py or other relevant files within the Litellm package. This malicious code could be designed to execute upon installation.</li>
<li><strong>Version Release:</strong> The compromised versions, 1.82.7 and 1.82.8, are released to PyPI, making them available for users to download and install.</li>
<li><strong>Package Installation:</strong> Users unknowingly download and install the compromised Litellm package using pip, triggering the execution of the injected malicious code.</li>
<li><strong>Initial Access:</strong> The malicious code may establish a reverse shell, download additional payloads, or perform other actions to gain initial access to the victim&rsquo;s system.</li>
<li><strong>Persistence:</strong> The attacker may establish persistence on the compromised system through various techniques, such as creating scheduled tasks or modifying startup scripts.</li>
<li><strong>Data Exfiltration/Malware Deployment:</strong> Depending on the attacker&rsquo;s objective, they may exfiltrate sensitive data, deploy ransomware, or perform other malicious activities.</li>
<li><strong>Lateral Movement:</strong> The attacker may attempt to move laterally to other systems within the compromised network, escalating their access and expanding their reach.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The compromise of Litellm versions 1.82.7 and 1.82.8 could lead to widespread compromise of systems that use the package. The injected malicious code could enable attackers to steal sensitive information, deploy malware, or gain unauthorized access to victim systems. The number of affected users is estimated to be in the thousands. This incident highlights the risks associated with supply chain attacks targeting open-source software repositories.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately stop updating to Litellm versions 1.82.7 and 1.82.8.</li>
<li>Revert to a known-good version of Litellm prior to 1.82.7.</li>
<li>Analyze network connections for suspicious traffic originating from systems where the compromised Litellm versions were installed, using network connection logs.</li>
<li>Monitor process creations for suspicious processes spawned from Python executables where Litellm is installed, using process creation logs and the Sigma rules provided below.</li>
<li>Investigate systems where Litellm 1.82.7 or 1.82.8 were installed for any signs of compromise.</li>
<li>Review the blog post at <a href="https://futuresearch.ai/blog/litellm-pypi-supply-chain-attack/">https://futuresearch.ai/blog/litellm-pypi-supply-chain-attack/</a> for further details on the compromise.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>supply-chain</category><category>pypi</category><category>litellm</category><category>compromise</category></item><item><title>LiteLLM Proxy API Key Verification SQL Injection</title><link>https://feed.craftedsignal.io/briefs/2024-11-litellm-sqli/</link><pubDate>Fri, 08 Nov 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-11-litellm-sqli/</guid><description>A SQL injection vulnerability exists in LiteLLM versions 1.81.16 to prior to 1.83.7 allowing an unauthenticated attacker to inject SQL queries via a crafted 'Authorization' header, potentially leading to unauthorized data access or modification.</description><content:encoded><![CDATA[<p>A critical SQL injection vulnerability has been identified in LiteLLM, specifically affecting versions 1.81.16 through 1.83.6. The vulnerability resides within the proxy API key verification process. Due to improper sanitization of the <code>Authorization</code> header, an unauthenticated attacker can inject arbitrary SQL commands. This is achieved by sending a specially crafted header to any LLM API route, such as <code>POST /chat/completions</code>, which triggers the vulnerable query through the proxy&rsquo;s error-handling mechanism. Defenders should prioritize patching to version 1.83.7 or later to mitigate this risk, or implement the suggested workaround.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker sends a crafted HTTP <code>Authorization</code> header to a LiteLLM API endpoint (e.g., <code>/chat/completions</code>).</li>
<li>The LiteLLM proxy receives the request and extracts the API key from the <code>Authorization</code> header.</li>
<li>Due to insufficient sanitization, the API key value is directly concatenated into a SQL query string.</li>
<li>The vulnerable SQL query is executed against the proxy&rsquo;s database.</li>
<li>The attacker injects SQL code to read sensitive data, such as user credentials or API keys, from the database.</li>
<li>The attacker may further inject SQL code to modify data, potentially granting themselves administrative privileges or compromising other users&rsquo; accounts.</li>
<li>The attacker gains unauthorized access to the LiteLLM proxy.</li>
<li>The attacker leverages the compromised proxy to access and control connected LLMs, exfiltrate data, or disrupt services.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SQL injection vulnerability can lead to complete compromise of the LiteLLM proxy. Attackers could read or modify sensitive data within the proxy&rsquo;s database, including API keys and credentials. This could lead to unauthorized access to managed LLMs and potentially allow attackers to exfiltrate sensitive data, disrupt services, or gain a foothold for further attacks within the compromised environment. The impact is significant due to the potential for widespread data breaches and service disruptions.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade LiteLLM to version 1.83.7 or later to patch the SQL injection vulnerability as detailed in the advisory <a href="https://github.com/advisories/GHSA-r75f-5x8p-qvmc">GHSA-r75f-5x8p-qvmc</a>.</li>
<li>If upgrading is not immediately feasible, set <code>disable_error_logs: true</code> in the <code>general_settings</code> configuration to mitigate the risk as described in the advisory <a href="https://github.com/advisories/GHSA-r75f-5x8p-qvmc">GHSA-r75f-5x8p-qvmc</a>.</li>
<li>Monitor web server logs for suspicious <code>Authorization</code> headers containing SQL injection payloads to detect potential exploitation attempts. Deploy the provided Sigma rule targeting HTTP request patterns.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>sqli</category><category>litellm</category><category>web-application</category></item><item><title>LiteLLM Server-Side Template Injection Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-11-litellm-ssti/</link><pubDate>Tue, 05 Nov 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-11-litellm-ssti/</guid><description>A server-side template injection vulnerability in LiteLLM versions 1.80.5 to before 1.83.7 allows authenticated users to execute arbitrary code within the LiteLLM Proxy process via a crafted prompt template, potentially exposing sensitive information and enabling command execution on the host.</description><content:encoded><![CDATA[<p>A server-side template injection (SSTI) vulnerability has been identified in LiteLLM versions 1.80.5 up to, but not including, 1.83.7. This flaw resides within the <code>/prompts/test</code> endpoint, which processes user-supplied prompt templates. Due to insufficient input sanitization, a malicious actor with a valid proxy API key can inject arbitrary code into the template, leading to its execution within the LiteLLM Proxy process. This vulnerability was disclosed on April 24, 2026. Successful exploitation can compromise the proxy&rsquo;s environment, potentially exposing sensitive credentials like provider API keys and database passwords, or allowing arbitrary command execution on the host system. Organizations using affected versions of LiteLLM are at risk. The vulnerability is addressed in version 1.83.7-stable by implementing a sandboxed template renderer.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker authenticates to the LiteLLM proxy server using a valid API key.</li>
<li>The attacker crafts a malicious prompt template containing SSTI payloads.</li>
<li>The attacker sends a POST request to the <code>/prompts/test</code> endpoint, including the crafted template in the request body.</li>
<li>The LiteLLM proxy server receives the request and processes the template without proper sanitization.</li>
<li>The SSTI payload executes arbitrary code within the LiteLLM proxy process.</li>
<li>The attacker gains access to environment variables containing sensitive information, such as API keys and database credentials.</li>
<li>The attacker uses the exposed credentials to gain unauthorized access to external services or data.</li>
<li>The attacker executes arbitrary commands on the host system, potentially leading to full system compromise.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SSTI vulnerability allows attackers to execute arbitrary code within the LiteLLM Proxy process. This can lead to the exposure of sensitive information such as API keys and database credentials, potentially enabling unauthorized access to other systems and data. Furthermore, attackers can execute arbitrary commands on the host, leading to full system compromise. The impact is significant for organizations relying on LiteLLM for managing and routing AI model requests, as it could result in data breaches, service disruption, and reputational damage.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade LiteLLM to version <code>1.83.7-stable</code> or later to patch the vulnerability, as this version implements a sandboxed template renderer (see Patches).</li>
<li>As a temporary workaround, block <code>POST /prompts/test</code> at your reverse proxy or API gateway to prevent exploitation attempts (see Workarounds).</li>
<li>Review and rotate API keys that should not have access to prompt management routes to limit the potential impact of compromised keys (see Workarounds).</li>
<li>Deploy the Sigma rule &ldquo;Detect LiteLLM SSTI Attempts via /prompts/test&rdquo; to your SIEM to identify potential exploitation attempts based on HTTP request patterns.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssti</category><category>litellm</category><category>template-injection</category><category>code-execution</category></item><item><title>LiteLLM Authenticated Command Execution via MCP stdio Test Endpoints</title><link>https://feed.craftedsignal.io/briefs/2024-01-litellm-rce/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-litellm-rce/</guid><description>Authenticated users with low-privilege API keys could execute arbitrary commands on the host running LiteLLM via the `/mcp-rest/test/connection` and `/mcp-rest/test/tools/list` endpoints, by submitting a server configuration including command execution parameters.</description><content:encoded><![CDATA[<p>LiteLLM versions 1.74.2 through 1.83.6 are vulnerable to authenticated command execution. Two endpoints, <code>POST /mcp-rest/test/connection</code> and <code>POST /mcp-rest/test/tools/list</code>, intended for previewing MCP server configurations, allowed any authenticated user to execute arbitrary commands on the proxy host. This was possible because the endpoints accepted a full server configuration in the request body, including the <code>command</code>, <code>args</code>, and <code>env</code> fields used by the stdio transport, without proper role checks. An attacker could exploit this vulnerability by using a low-privilege API key to send a crafted request containing malicious commands, leading to command execution with the privileges of the proxy process. The vulnerability was patched in version 1.83.7 by enforcing the <code>PROXY_ADMIN</code> role for these endpoints.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker authenticates to the LiteLLM proxy with a valid, but low-privilege, API key.</li>
<li>Attacker crafts a malicious JSON payload containing a server configuration intended for the stdio transport. The payload includes the <code>command</code>, <code>args</code>, and <code>env</code> fields, which specify the command to be executed, its arguments, and environment variables, respectively.</li>
<li>Attacker sends a <code>POST</code> request to either the <code>/mcp-rest/test/connection</code> or <code>/mcp-rest/test/tools/list</code> endpoint, with the malicious JSON payload in the request body.</li>
<li>The LiteLLM proxy receives the request and, due to the vulnerability, attempts to connect to the supplied server configuration.</li>
<li>The proxy spawns the supplied command as a subprocess on the proxy host, using the privileges of the proxy process.</li>
<li>The attacker-supplied command executes arbitrary code on the host.</li>
<li>The attacker gains control of the proxy host with the privileges of the LiteLLM proxy.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to execute arbitrary commands on the host running the LiteLLM proxy. Since the vulnerability can be exploited with a low-privilege API key, this significantly broadens the attack surface. Depending on the privileges of the proxy process, this could lead to full system compromise, data exfiltration, or denial of service. The lack of specific victim count or sector targeting information in the advisory suggests a broad potential impact across various deployments of LiteLLM.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade LiteLLM to version 1.83.7 or later to remediate the vulnerability (see Patches).</li>
<li>As a temporary workaround, block <code>POST</code> requests to the <code>/mcp-rest/test/connection</code> and <code>/mcp-rest/test/tools/list</code> endpoints at your reverse proxy or API gateway (see Workarounds).</li>
<li>Monitor web server logs for <code>POST</code> requests to <code>/mcp-rest/test/connection</code> and <code>/mcp-rest/test/tools/list</code> endpoints, looking for suspicious <code>command</code>, <code>args</code>, and <code>env</code> parameters in the request body (see rules below).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>rce</category><category>litellm</category><category>command-injection</category></item></channel></rss>