CVE-2024-34511: Gradio's Component Server does not properly consider` _is_server_fn` for functions
Gradio before 4.13.0 let a client call any attribute of a component through the `/component_server/` endpoint, because the handler never checked the `_is_server_fn` flag. Fixed in gradio 4.13.0, where unmarked functions return 404.
Published May 5, 2024 · Updated May 6, 2024 · Analysis Nov 10, 2026
What an attacker can do
In gradio/routes.py, the /component_server/ handler took a component ID and a fn_name from the request and ran getattr(block, body.fn_name) on the component, calling the result with request data. It did not check whether the method was meant to be exposed. Only methods marked with the @server decorator, such as FileExplorer.ls, should be reachable.
A remote client could name any method on a component and invoke it with chosen arguments. The fix test shows a preprocess call that used to be dispatched and now returns 404. The sources do not show what a particular component method gives an attacker, so the real impact depends on which components your app uses. The CVSS 3.1 vector reads AV:N, PR:N, UI:N with high attack complexity, high confidentiality and low integrity impact.
Exposure is for any Gradio app reachable by untrusted users.
Who is affected
pip package gradio before 4.13.0. Check:
pip show gradioAll Gradio apps that serve this endpoint are in scope, including ones that use no @server component.
gradio
- Ecosystem
- PyPI
- Affected
- < 4.13.0
- Fixed in
- 4.13.0
- Check
pip show gradio
How to fix it
Upgrade to gradio 4.13.0.
pip install --upgrade "gradio>=4.13.0"The fix in commit 24a5836 now looks up the function with a None default and proceeds only if _is_server_fn is true. Otherwise it returns 404 "Function not found." No workaround is documented.
How to tell if you were hit
Look in access logs for POST requests to /component_server/ or /component_server with a fn_name other than a known server function. On a fixed server, unauthorized names return 404 with "Function not found", so a pile of these from one client is a probe. Review the app's component list to see which methods an attacker could have reached.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Component Server in Gradio before 4.13 does not properly consider _is_server_fn for functions.
Questions
- Which Gradio version fixes CVE-2024-34511?
Gradio 4.13.0. Earlier versions are affected.
- What does the flag _is_server_fn do?
It marks a component method as safe to call over HTTP. The patched handler refuses anything without it.
- How bad is it?
The sources do not show a specific exploit. The vector gives high confidentiality impact with high attack complexity, and the effect depends on the component methods in your app.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Gradio vulnerabilities
All Gradio entriesCVE-2026-49119
Gradio FileExplorer preprocess path traversal allows files outside root_dir to reach callbacks
high7.5Jul 1, 2026CVE-2026-10783
Gradio: Audio cache key ignores metadata when saving numpy audio outputs
low2.5Jun 4, 2026CVE-2026-48545
Gradio contains a cookie injection vulnerability
high6.8May 27, 2026CVE-2026-27167
Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret
lowMar 1, 2026CVE-2026-28414
Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+
high7.5Mar 1, 2026CVE-2026-28415
Gradio has an Open Redirect in its OAuth Flow
medium4.3Mar 1, 2026
