CVE-2024-4253 Command Injection in gradio-app/gradio

High 7.5 Published Updated

Attackers can inject commands via GitHub workflow inputs to execute code and exfiltrate secrets from the Gradio repository.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-4253?

CVE-2024-4253 is a high-severity command injection vulnerability in Gradio Project Gradio, published on 4 Jun 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A command injection vulnerability exists in the gradio-app/gradio repository, specifically within the 'test-functional.yml' workflow. The vulnerability arises due to improper neutralization of special elements used in a command, allowing for unauthorized modification of the base repository or secrets exfiltration. The issue affects versions up to and including '@gradio/[email protected]'. The flaw is present in the workflow's handling of GitHub context information, where it echoes the full name of the head repository, the head branch, and the workflow reference without adequate sanitization. This could potentially lead to the exfiltration of sensitive secrets such as 'GITHUB_TOKEN', 'COMMENT_TOKEN', and 'CHROMATIC_PROJECT_TOKEN'.

Weakness: CWE-78

Which versions are affected by CVE-2024-4253?

1 open source package ship an affected version, including gradio. It affects 1 product.

PackageAffectedFixed in
gradio PyPIAll versions4.29.0

Products include Gradio Project Gradio.

How do I fix CVE-2024-4253?

Upgrade gradio to 4.29.0 or later.

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

Is CVE-2024-4253 being exploited?

There is no known exploitation of CVE-2024-4253 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Gradio Project Gradio vulnerabilities

Sources

Also known as GHSA-r897-wrpm-h4vw, PYSEC-2024-321.

Is CVE-2024-4253 in your software?

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

Check your SBOMs for free