CVE-2024-1540 Command Injection in gradio-app/gradio via deploy+test-visual.yml workflow

High 8.6 Published Updated

Attackers can execute unauthorized commands via GitHub Actions workflows, potentially modifying repositories or exfiltrating secrets.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-1540?

CVE-2024-1540 is a high-severity command injection vulnerability in Gradio Project Gradio, published on 27 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

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.

Weakness: CWE-77

Which versions are affected by CVE-2024-1540?

It affects 1 product.

Products include Gradio Project Gradio.

How do I fix CVE-2024-1540?

No fix has been published for CVE-2024-1540 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2024-1540 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1540 exists.

Public exploit code: 1 proofs of concept on GitHub.

All Gradio Project Gradio vulnerabilities

Sources

Is CVE-2024-1540 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free