Vulnerability · Published Mar 27, 2024 · Assigned by @huntr_ai
CVE-2024-1540Command Injection in gradio-app/gradio via deploy+test-visual.yml workflow
High 8.6
In plain English
A high-severity command injection in gradio-app/gradio from gradio-app. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.0% (higher than 81% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
A command injection vulnerability exists in the deploy+test-visual.yml workflow of the gradio-app/gradio repository, due to improper neutralization of special elements used in a command. This vulnerability allows attackers to execute unauthorized commands, potentially leading to unauthorized modification of the base repository or secrets exfiltration. The issue arises from the unsafe handling of GitHub context information within a `run` operation, where expressions inside `${{ }}` are evaluated and substituted before script execution. Remediation involves setting untrusted input values to intermediate environment variables to prevent direct influence on script generation.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | gradio | 4.18.0 | GHSA-xcgp-r7r8-2hc9 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| gradio-app | gradio-app/gradio | unspecified – before N/A |
Weakness: CWE-77 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L