CVE-2024-41127
Monkeytype vulnerability
Monkeytype is a minimalistic and customizable typing test. Monkeytype is vulnerable to Poisoned Pipeline Execution through Code Injection in its ci-failure-comment.yml GitHub Workflow, enabling attackers to gain pull-requests write access. The ci-failure-comment.yml workflow is triggered when the Monkey CI workflow completes. When it runs, it will download an artifact uploaded by the triggering workflow and assign the contents of ./pr_num/pr_num.txt artifact to the steps.pr_num_reader.outputs.content WorkFlow variable. It is not validated that the variable is actually a number and later it is interpolated into a JS script allowing an attacker to change the code to be executed. This issue leads to pull-requests write access. This vulnerability is fixed in 24.30.0.
Affected products
Monkeytype. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Monkeytype runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/monkeytypegame/monkeytype/security/advisories/GHSA-wcjf-5464-4wq9 · Vendor Advisory
- github.com/monkeytypegame/monkeytype/commit/29627fd0d5f152e2da59671987090ea0a5c29874 · Patch
- securitylab.github.com/advisories/GHSL-2024-167_monkeytype · Exploit
- nvd.nist.gov/vuln/detail/CVE-2024-41127
- cve.org/CVERecord?id=CVE-2024-41127
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.