LiteLLM RCE: How Did One HTTP Request Get Root?
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
Second, we looked at a feature called [music] custom code guardrails, where admins can add Python-like code to filter prompts.
Now, if you click in the UI run test, then the code runs inside a sandbox, [music] and it strips out dangerous Python code. But, if you try to execute the raw endpoint, the raw API behind it,
that actually registers the guardrails, then you'd find out it runs in no sandbox. It just runs [music] whatever you input it. >> No sandbox? >> Not at all. So, basically, you can register a new guardrail, and the server just passes the Python, the raw Python, straight into exec and execute it as root. >> Okay. >> [sighs and gasps] >> I feel much safer already. >> Now, you can combine it with the default master key. >> Wait for it. SK1234?
>> Mhm, you got it. Or another default admin flaw, and with a single HTTP request, you gain remote code execution on the workload as root. >> As root? >> That's correct. >> Wow.





