---
title: "A Security Review of Gradio 5"
description: "Trail of Bits audited Gradio ahead of the 5.0 release, and every finding was fixed and validated before launch."
url: "https://swe.quest/articles/a-security-review-of-gradio-5-84103db83caad7ae"
canonical: "https://huggingface.co/blog/gradio-5-security"
source: "Hugging Face"
published: "2024-10-10"
difficulty: "easy"
kind: "Announcement"
reading_minutes: 5
tags: ["appsec","supply-chain-security","python","security"]
---

# A Security Review of Gradio 5

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-10-10, 5 min read, Announcement. Original: [https://huggingface.co/blog/gradio-5-security](https://huggingface.co/blog/gradio-5-security)

## Summary

Trail of Bits audited Gradio ahead of the 5.0 release, and every finding was fixed and validated before launch. Issues spanned four scenarios. Locally run apps had CORS misconfigurations enabling token theft. Deployed apps had a full-read SSRF, XSS via arbitrary file uploads, a traffic-rerouting race condition and arbitrary file leaks. Share links had root RCE through an exposed Docker API behind nginx and unencrypted frp tunnels. The CI pipeline pinned GitHub Actions to tags instead of commit SHAs. Gradio has since added security unit tests, fuzzing and Semgrep in CI to prevent regressions.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- web security basics ([easy posts on Application security](https://swe.quest/tags/appsec.md?difficulty=easy))
- CORS

## Keywords

Gradio, Trail of Bits, Hugging Face Spaces, frp, GitHub Actions, Semgrep, SSRF, CORS

## Related posts

- [4M Models Scanned: Protect AI + Hugging Face 6 Months In](https://swe.quest/articles/4m-models-scanned-protect-ai-hugging-face-6-months-in-5f51101feb9d865e.md): Hugging Face · 2025-04-14 · Easy · 7 min read · Supply chain security, Vulnerability research, Machine learning, Security
  Six months into the Hugging Face partnership, Protect AI's Guardian has scanned 4.47 million model versions across 1.41 million Hub repositories and flagged 352,000 unsafe or suspicious issues in 51,700 models.
- [Coding Agent Horror Stories: The 29 Million Secret Problem](https://swe.quest/articles/coding-agent-horror-stories-the-29-million-secret-problem-7f5056c95d2769e4.md): Docker · 2026-07-28 · Medium · 12 min read · Supply chain security, AI for coding, Sandboxing & isolation, JavaScript, AI agents
  The s1ngularity supply-chain attack on the Nx npm package used a post-install script to find installed AI coding CLIs (Claude Code, Gemini CLI, Amazon Q) and invoke them with permission-bypass flags like --dangerously-skip-permissions, prompting the agent to inventory secrets across the home directory before exfiltrating them to public repos under the victim's GitHub account.
- [Our response to the TanStack npm supply chain attack](https://swe.quest/articles/our-response-to-the-tanstack-npm-supply-chain-attack-a4ee1bd194da9989.md): OpenAI · 2026-05-13 · Easy · 6 min read · Supply chain security, Incidents & postmortems, JavaScript, CI/CD
  Two OpenAI employee devices were compromised via the malicious TanStack npm package in the Mini Shai-Hulud supply chain attack, leading to credential-focused exfiltration from a limited set of internal repositories that held code-signing certificates for iOS, macOS and Windows apps.
- [Defending Your Software Supply Chain: What Every Engineering Team Should Do Now](https://swe.quest/articles/defending-your-software-supply-chain-what-every-engineering-team-should-do-now-434c4d75b0885a00.md): Docker · 2026-04-02 · Medium · 9 min read · Supply chain security, CI/CD, Containers, AI agents
  Recent supply chain compromises (the axios npm hijack attributed to Lazarus Group, the TeamPCP campaign via Trivy's GitHub Action, Shai-Hulud, GlassWorm) share one root cause: implicit trust in mutable tags, broad long-lived tokens and unsandboxed runners.
- [MCP Horror Stories: The GitHub Prompt Injection Data Heist](https://swe.quest/articles/mcp-horror-stories-the-github-prompt-injection-data-heist-118a1d699702a7aa.md): Docker · 2025-08-14 · Medium · 15 min read · AI agents, Application security, Identity & auth, LLMs
  A prompt injection planted in a public GitHub issue can hijack an AI agent using the official GitHub MCP server.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
