Command Injection in Gradio test-functional.yml Workflow
CVE-2024-4253 is a command injection vulnerability in the gradio-app/gradio repository, specifically within the 'test-functional.yml' GitHub Actions workflow. The vulnerability is due to improper neutralization of user-controlled input (such as repository and branch names) when echoed in shell commands. This allows an attacker to inject arbitrary commands into the workflow execution context, potentially modifying the base repository or exfiltrating sensitive secrets. The issue affects versions up to and including '@gradio/video@0.6.12'.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
An attacker with the ability to control the repository or branch name (e.g., via a pull request from a malicious fork) can inject arbitrary shell commands into the workflow. This can lead to the exfiltration of sensitive secrets such as 'GITHUB_TOKEN', 'COMMENT_TOKEN', and 'CHROMATIC_PROJECT_TOKEN', or unauthorized modification of the base repository. The impact is significant as it compromises the integrity and confidentiality of the CI/CD pipeline and associated secrets.
If you can’t patch tonight, do this now.
Restrict workflow permissions to the minimum necessary, especially for secrets. Use GitHub's 'pull_request_target' event with caution and consider limiting which users can trigger workflows from forks. Monitor for suspicious activity in workflow runs and rotate any potentially exposed secrets.
Patch, then assume compromise.
Update the 'test-functional.yml' workflow to properly sanitize all user-controlled inputs before using them in shell commands. Use safe quoting and parameterization techniques to prevent command injection. Review and update to a fixed version of the workflow or apply the recommended patch from the vendor.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.