Skip to content
Access control Write-up Intermediate

When LLM Gateways Go Wrong: Findings from LiteLLM

The /config/update endpoint lacked a role check, so any authenticated user, including low-privileged UI sessions, could change the proxy's runtime configuration. This let an attacker read arbitrary files, take over the admin account and execute code by loading a Python module from cloud storage, while a separate SSRF in the user_config parameter could redirect LLM calls and leak provider API keys.

etal Follow

Published on research.checkpoint.com

Our security assessment of LiteLLM (v1.77.7), a widely used open-source LLM gateway, uncovered multiple high-impact vulnerabilities (tracked as CVE-2026-35029, CVE-2026-59823) which have been resolved as of LiteLLM version 1.83.9.

etal, on research.checkpoint.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The update_config handler relied only on the generic authentication dependency and never checked for the PROXY_ADMIN role, while UI session tokens were matched against a route allowlist using prefix matching so /config/update passed the /config entry.

Impact

A low-privileged authenticated user could read arbitrary files, take over the admin account and achieve remote code execution on the gateway, and separately could use the user_config parameter to send LLM requests to an attacker server and capture provider API keys.

What the attacker needed

A valid low-privileged account; UI login to get a session token; attacker-controlled cloud storage bucket

The fix

The issues were fixed in LiteLLM 1.83.9, with the endpoint now requiring an admin role check and the user_config path no longer bypassing the clientside auth restrictions.

How it was found

  1. Log in to the LiteLLM UI to obtain a session token tied to the dashboard team.
  2. Send a request to the config update endpoint setting an environment variable that points the logo path at a sensitive file.
  3. Request the image endpoint to retrieve the contents of that file.
  4. Send another config update setting the admin username and password variables to attacker-chosen values.
  5. Log in to the UI with those credentials to become the proxy admin.
  6. Send a config update defining a pass-through endpoint whose target is a Python module in cloud storage, which is downloaded and executed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An LLM gateway is a service that sits between an app and AI model providers, holding the API keys and settings. Here the admin settings page accepted changes from ordinary logged-in users because the code checked that you were logged in but not that you were an admin. Once a normal user could change settings, they could point the app at sensitive files, swap the admin password, or make it run their own code.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.