Pwn2Own Berlin 2026: How I Got the RCE and Lost the Slot
A researcher chained three flaws in LiteLLM: a non-admin key could set allowed_routes to bypass role checks, then self-promote to proxy_admin via the user update endpoint, and finally reach an unsandboxed Jinja2 template endpoint to run commands as root. The chain took three HTTP requests and gave root code execution from a low-privilege internal_user API key.
Published on flex0geek.blogspot.com
on May 11, 2026
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
Likely missing field-level authorisation on user-supplied fields (allowed_routes and user_role) combined with rendering user templates in an unsandboxed Jinja2 environment.
Impact
An attacker holding only a vanilla internal_user API key could gain root code execution on the LiteLLM proxy host; the text notes the final SSTI primitive was later published as CVE-2026-42203 and the two privilege-escalation bugs were silently patched.
What the attacker needed
An internal_user API key; default LiteLLM config; network access to the proxy
The fix
The vendor added caller-permission checks on allowed_routes and blocked non-admins from changing user_role, and the SSTI site was sandboxed, though three other rendering sites reportedly remain unfixed.
How it was found
- Send a key generation request as an internal_user with allowed_routes set to management_routes to get a key that skips the role gate.
- Use that new key to call the user update endpoint and set user_role to proxy_admin.
- Call the prompts test endpoint with a crafted template that walks Python internals and runs a shell command.
- Observe the command output (root id) in the response stream.
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.
LiteLLM is a proxy that sits in front of AI models and hands out API keys with different permission levels. The researcher found that a low-level key could quietly give itself extra permissions and then reach a feature that runs templates, which let it run system commands as the server's root user. In short, small permission mistakes stacked up into full control of the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.