Monkeytype
Monkeytype: fork PR can execute code with elevated GITHUB_TOKEN
Monkeytype is a minimalistic and customizable typing test. Prior to 26.43.0, the .github/workflows/fix-formatting.yml workflow runs on pull_request_target with repository write permissions, checks out a fork pull request, installs dependencies from the fork's package.json, and invokes the fork-controlled oxfmt binary. Because actions/checkout persists the elevated GITHUB_TOKEN in Git configuration until after untrusted code executes, an external contributor whose pull request receives the format label can run arbitrary code, read or exfiltrate the token, and push repository content or modify pull requests and issues. The issue affects the repository CI workflow, not the Monkeytype application or user data. This issue is fixed in version 26.43.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 26.43.0
Fixed in 26.43.0
Mitigation
Upgrade monkeytype to 26.43.0 or later.
References
- Vendor advisory github.com/monkeytypegame/monkeytype/security/…
- Patch github.com/monkeytypegame/monkeytype/commit/59…
- Release notes github.com/monkeytypegame/monkeytype/releases/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.