Security Updates in Gradio 5
- Source
- youtube.com
- Author
- Hugging Face
- Date
Context
A core maintainer of Gradio, a Python library for building machine learning web apps, explains in a Hugging Face video that the team commissioned an independent security audit from Trail of Bits before releasing Gradio 5. The maintainer says each finding was fixed before launch, that Trail of Bits reviewed the fixes, and that the report is public.
The clearest example concerns apps run locally. In Gradio 4, cross-origin protections, which stop other websites from sending requests to your machine, could be bypassed by a request carrying a cookie or a null origin, as happens inside an iframe. A malicious page could then send requests to an app on localhost. Gradio 5 blocks this by default, with a strict_cors setting to loosen it. Other findings include bypassing - limits on deployed apps, scripts hidden in uploaded SVG files, unencrypted share-link traffic, and unpinned GitHub Actions in the project's build pipeline. The fixes are the maintainers' account.
- Before Gradio 5, Hugging Face had Trail of Bits audit the codebase, fixed the findings and published the report; Trail of Bits also reviewed the fixes.
- Gradio 4's localhost CORS protection could be bypassed by requests carrying cookies or a null origin, which iframes can send; Gradio 5 blocks these by default, with a strict CORS parameter that can be set to false for legitimate .
- On deployed apps, uploaded SVGs could carry JavaScript and look trustworthy on a Hugging Face domain; Gradio 5 forces such files to download instead of rendering. It also hardened path traversal and SSRF protections.
- Share-link traffic between the local app and Gradio's servers was not encrypted, so it could be intercepted on public Wi-Fi; Gradio 5 ships a new FRP to secure that connection.
- The CI findings apply to most open-source repos: pin GitHub Actions to exact versions, and note that runner memory on contributor PR jobs can be dumped to leak secrets even when token use looks restricted.
- File — A named unit of stored data that keeps its contents while no program is using it.
- Path — A description of a file or folder location, written using directory names and separators.
- embedding — A list of numbers representing a piece of text's meaning, so that similar meanings end up numerically close and can be searched.
- Client — The program that sends a request to a server and receives its response.
Checking sign-in…
Loading comments…





