LiteLLM Sandbox Escape via Unicode Normalization Bypass
Target Platform: LiteLLM < v1.51.5
🔍 Vulnerability Mechanism
LiteLLM custom code validation checks scripts against regex pattern blocklists (e.g., preventing access to __globals__ or __builtins__). However, the regex scan runs on the raw string before Unicode normalization (NFKC).
Python automatically normalizes full-width Unicode characters to standard ASCII at execution time.
💥 Exploitation Path
An attacker can write:
allow.__globals__
The regex blacklist ignores the full-width globals string, but Python normalizes it to standard ASCII __globals__ when executing, escaping the validation sandbox.
REGAAN R