Skip to content
Heist/ feed
Back to feed
High

LiteLLM: Server-Side Template Injection in /prompts/test endpoint

Type: advisorySources: OSV

LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.80.5 to before version 1.83.7, the POST /prompts/test endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process. The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host. This issue has been patched in version 1.83.7.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-42203
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 15:09 UTC · Revision 1

Source evidence

LiteLLM: Server-Side Template Injection in /prompts/test endpoint

core-osv · Original source

Published 8 May 2026, 03:36 UTC

LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.80.5 to before version 1.83.7, the POST /prompts/test endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process. The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host. This issue has been patched in version 1.83.7.

osv:CVE-2026-42203
Complete source record
{
  "id": "7603a56f75b621f99702597ce44bae8f576edc173b69e8cf0c9c04e67ffc0839",
  "url": "https://osv.dev/vulnerability/CVE-2026-42203",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "LiteLLM: Server-Side Template Injection in /prompts/test endpoint",
    "summary": "LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.80.5 to before version 1.83.7, the POST /prompts/test endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process. The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host. This issue has been patched in version 1.83.7.",
    "evidence": "osv:CVE-2026-42203",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-42203",
      "aliases": [
        "CVE-2026-42203",
        "GHSA-xqmj-j6mv-4862",
        "PYSEC-2026-2602"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/berriai/litellm",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6c49b95a4ab75651ddde1c5c3cec8531f986755a"
                },
                {
                  "fixed": "e0d5c28db02b3219dbd944666a55f49732197922"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.80.5"
                      },
                      {
                        "fixed": "1.83.7"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e0d5c28db02b3219dbd944666a55f49732197922"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.83.7-stable"
                  },
                  {
                    "cpe": "cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.80.5"
                      },
                      {
                        "fixed": "1.83.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42203.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.932349628Z",
      "provider": "osv",
      "references": [
        "https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42203.json",
        "https://access.redhat.com/security/cve/CVE-2026-42203",
        "https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42203.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-42203",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2467917"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1336"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42203.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-42203",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 496684,
  "published_at": "2026-05-08T03:36:58.648+00:00"
}