# LiteLLM SQL Injection (CVE-2026-42208) Exploited In The Wild Within 36 Hours of Disclosure


## The Threat


BerriAI's LiteLLM, a widely-used Python package that provides a unified interface for managing calls to large language models, is under active exploitation following the disclosure of a critical SQL injection vulnerability. Tracked as CVE-2026-42208 with a CVSS score of 9.3, the flaw allows attackers to inject malicious SQL commands through user-controlled input, potentially compromising databases and enabling unauthorized data modification or exfiltration.


The rapid weaponization of this vulnerability—within 36 hours of public disclosure—underscores the danger posed by security flaws in foundational infrastructure tools. LiteLLM is deployed across numerous organizations as a proxy layer for LLM integrations, making it an attractive target for attackers seeking to pivot deeper into corporate networks. The vulnerability's presence in a Python package widely used in AI/ML pipelines increases the blast radius, as many deployments may not receive timely updates.


The core issue stems from insufficient input sanitization when LiteLLM constructs SQL queries for database operations. By crafting requests with specially-formatted SQL payloads, an attacker can break out of the intended query context and execute arbitrary SQL commands. This could allow modification of database records, deletion of data, authentication bypass, or exfiltration of sensitive information depending on the database permissions and how LiteLLM is configured in a target environment.


## Severity and Impact


| Field | Details |

|-------|---------|

| CVE ID | CVE-2026-42208 |

| CVSS Score | 9.3 (Critical) |

| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |

| Attack Vector | Network |

| Attack Complexity | Low |

| Privileges Required | None |

| User Interaction | None |

| Scope | Unchanged |

| Confidentiality Impact | High |

| Integrity Impact | High |

| Availability Impact | High |

| CWE | CWE-89 (SQL Injection) |

| Exploitation Status | Active, in-the-wild exploitation confirmed |

| Time to Exploitation | 36 hours post-disclosure |


The high CVSS score reflects the vulnerability's potential for complete system compromise. With no authentication required and low attack complexity, a remote attacker can exploit this flaw with minimal sophistication. Organizations running exposed LiteLLM instances or those accessible from the internet are at immediate risk.


## Affected Products


LiteLLM Python Package:

  • Versions prior to 1.42.5 are affected
  • All deployment contexts where LiteLLM constructs SQL queries directly or indirectly
  • Both containerized and bare-metal deployments vulnerable

  • Affected Integrations:

  • Any application using LiteLLM as a dependency for LLM proxy/management
  • Systems with LiteLLM exposed via REST API endpoints
  • Microservices architectures using LiteLLM as a centralized gateway
  • Kubernetes deployments with LiteLLM pods accessible to untrusted networks

  • Organizations should inventory their use of LiteLLM across all environments, including development, staging, and production systems. The vulnerability affects the package across operating systems—no platform is exempt.


    ## Mitigations


    ### Immediate Actions (Today)


    1. Update LiteLLM immediately to version 1.42.5 or later. Use pip install --upgrade litellm in all environments where the package is installed.


    2. Restart all LiteLLM processes after patching to ensure the updated code is loaded.


    3. Isolate exposed instances temporarily if patching cannot be deployed immediately. Restrict network access to LiteLLM endpoints to trusted internal networks only; block all external ingress.


    ### Short-Term Mitigations (This Week)


    4. Review database logs and query audit trails for evidence of exploitation attempts or successful SQL injection. Look for unusual SQL commands, dropped tables, or unexpected data modifications.


    5. Implement network-level controls such as Web Application Firewall (WAF) rules to detect and block common SQL injection patterns. Many WAF vendors provide pre-built rules for SQL injection that should be enabled.


    6. Monitor for suspicious activity targeting LiteLLM instances:

    - Unusual database query patterns

    - Authentication bypass attempts

    - Unexpected data exfiltration

    - Application crashes or errors


    7. Check for unauthorized database changes from the time the vulnerability became public (if your organization was running an unpatched version). This includes modified records, deleted tables, or new user accounts.


    ### Long-Term Hardening


    8. Implement database least-privilege principles. Ensure the database user account that LiteLLM uses has minimal necessary permissions. If LiteLLM only needs to read certain tables, deny write access. This limits the damage an SQL injection can inflict.


    9. Use parameterized queries or prepared statements wherever possible in any custom code that builds on LiteLLM. Ensure no dynamic SQL construction occurs without proper escaping.


    10. Deploy defense-in-depth by isolating LiteLLM behind authentication layers, API gateways, and rate limiting. Never expose LiteLLM directly to untrusted networks.


    11. Enable database activity monitoring (DAM) to detect and alert on suspicious SQL patterns. Premium database solutions offer DAM features that can catch exploitation attempts in real time.


    12. Maintain an inventory of all dependencies and their versions. Use automated tools like OWASP Dependency-Check or Snyk to identify vulnerable packages in your supply chain.


    ## References


  • NIST CVE Database: https://nvd.nist.gov/vuln/detail/CVE-2026-42208
  • BerriAI Security Advisory: https://github.com/BerriAI/litellm/security/advisories
  • LiteLLM GitHub Repository: https://github.com/BerriAI/litellm
  • CWE-89 - SQL Injection: https://cwe.mitre.org/data/definitions/89.html
  • OWASP SQL Injection Prevention Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html

  • ---


    ## Key Takeaway


    CVE-2026-42208 represents a critical risk to organizations relying on LiteLLM for LLM proxy management. The combination of network accessibility, no authentication requirement, and low attack complexity has made this a highly attractive target for threat actors. The confirmed active exploitation within 36 hours of disclosure demonstrates the speed at which vulnerabilities in foundational tools are weaponized.


    Organizations must prioritize patching to version 1.42.5 or later immediately. For environments where immediate patching is infeasible, isolating LiteLLM instances from untrusted networks is essential. Combined with robust monitoring, database access controls, and post-incident forensics, these measures will significantly reduce the likelihood of successful exploitation and limit potential damage.