CVE-2024-39236: Gradio: code injection via component metadata (CVSS 9.8)
CRITICAL PoC AVAILABLE CISA: ATTENDGradio v4.36.1 contains a code injection flaw in component_meta.py triggerable via crafted inputs — CVSS 9.8 but vendor disputes severity, asserting the attack path requires self-targeting (attacker controls their own instance). Risk is real for shared/multi-tenant Gradio deployments where untrusted users submit inputs to a server others depend on. Audit all internet-exposed Gradio instances immediately and upgrade beyond v4.36.1 if a patch exists, or restrict access to trusted users only.
Risk Assessment
CVSS 9.8 overstates risk for typical single-user local deployments — vendor's dispute is valid in that context. However, shared Gradio deployments (internal AI demo platforms, multi-user ML prototyping environments, public-facing model demos) present genuine server-side code execution risk if untrusted users can submit inputs. Attack complexity is low and no authentication is required per CVSS vector, making internet-exposed shared instances a critical exposure. Exploitability is HIGH for shared deployments, LOW for single-user local setups.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| gradio | pip | — | No patch |
Do you use gradio? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Inventory all Gradio deployments — identify version and exposure (local vs shared vs public).
-
Upgrade Gradio to latest version; check GitHub advisory GHSA-9v2f-6vcg-3hgv for patched version.
-
If upgrade is not immediately possible: restrict Gradio access to authenticated, trusted users only — add network controls (VPN, IP allowlist) in front of any shared instance.
-
Disable public-facing Gradio demos running v4.36.1 until patched.
-
Detection: monitor for anomalous subprocess spawning or file writes from the Gradio process; review component_meta.py inputs in application logs for eval/exec patterns.
-
Review Hugging Face Spaces deployments if using this version.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-39236?
Gradio v4.36.1 contains a code injection flaw in component_meta.py triggerable via crafted inputs — CVSS 9.8 but vendor disputes severity, asserting the attack path requires self-targeting (attacker controls their own instance). Risk is real for shared/multi-tenant Gradio deployments where untrusted users submit inputs to a server others depend on. Audit all internet-exposed Gradio instances immediately and upgrade beyond v4.36.1 if a patch exists, or restrict access to trusted users only.
Is CVE-2024-39236 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-39236, increasing the risk of exploitation.
How to fix CVE-2024-39236?
1. Inventory all Gradio deployments — identify version and exposure (local vs shared vs public). 2. Upgrade Gradio to latest version; check GitHub advisory GHSA-9v2f-6vcg-3hgv for patched version. 3. If upgrade is not immediately possible: restrict Gradio access to authenticated, trusted users only — add network controls (VPN, IP allowlist) in front of any shared instance. 4. Disable public-facing Gradio demos running v4.36.1 until patched. 5. Detection: monitor for anomalous subprocess spawning or file writes from the Gradio process; review component_meta.py inputs in application logs for eval/exec patterns. 6. Review Hugging Face Spaces deployments if using this version.
What systems are affected by CVE-2024-39236?
This vulnerability affects the following AI/ML architecture patterns: ML demo platforms, model serving, AI prototyping environments, internal AI tooling.
What is the CVSS score for CVE-2024-39236?
CVE-2024-39236 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 1.88%.
Technical Details
NVD Description
Gradio v4.36.1 was discovered to contain a code injection vulnerability via the component /gradio/component_meta.py. This vulnerability is triggered via a crafted input. NOTE: the supplier disputes this because the report is about a user attacking himself.
Exploitation Scenario
An adversary identifies an organization's shared internal Gradio deployment used by the ML team to test models. The attacker — either an insider or an external actor who bypassed weak authentication — crafts a malicious input payload targeting the component_meta.py code path. The crafted input triggers code injection on the server, giving the attacker arbitrary code execution in the context of the Gradio process. From there, they exfiltrate API keys (OpenAI, Hugging Face, cloud credentials) stored as environment variables, steal model weights, pivot to internal infrastructure, or establish persistence via a reverse shell. The attack is fully network-based with no privileges required in shared-access scenarios.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H References
- github.com/Aaron911/PoC/blob/main/Gradio.md Exploit 3rd Party
- github.com/advisories/GHSA-9v2f-6vcg-3hgv 3rd Party
- github.com/gradio-app/gradio/issues/8853 Exploit Issue Vendor
- github.com/fkie-cad/nvd-json-data-feeds Exploit
Timeline
Related Vulnerabilities
CVE-2024-47167 9.8 Gradio: unauthenticated SSRF in /queue/join, internal pivot
Same package: gradio CVE-2023-25823 9.8 Gradio: hardcoded SSH key leaks via share=True demos
Same package: gradio CVE-2024-0964 9.4 Gradio: unauthenticated LFI exposes full server filesystem
Same package: gradio CVE-2023-34239 9.1 Gradio: path traversal + SSRF exposes model files & infra
Same package: gradio CVE-2024-4253 9.1 Gradio: CI/CD command injection enables secrets exfiltration
Same package: gradio
AI Threat Alert