Incident report

Gradio /component_server Arbitrary Method Invocation Local File Read

CVE-2024-1561 (published April 15, 2024) exposed an unauthenticated local file read vulnerability in `gradio` (`< 4.13.0`) via its `/component_server` API route. The endpoint permitted remote callers to invoke arbitrary methods on server-side `Component` classes, specifically abusing `move_resource_to_block_cache()` with attacker-controlled paths to copy sensitive host files (such as `/etc/passwd`, `.env` files, and Hugging Face/OpenAI tokens) into a publicly downloadable cache directory. Because tens of thousands of AI demos run publicly on Gradio and Hugging Face Spaces, credential exposure risk was widespread. Gradio v4.13.0 restricted callable component methods via explicit allowlists.

Incident record

Reported
Severity
High
Vector
Exposed Infrastructure
Affected system type
Public ML Demo & Model Hosting Interfaces
Reference
CVE-2024-1561
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-1561

Inspect in Interactive Incidents Hub

Defensive lesson

Upgrade Gradio past 4.13.0, never store long-lived production secrets in public demo environments, and restrict server-side RPC method dispatch strictly.

Referenced techniques