CVE-2021-32724
📋 TL;DR
CVE-2021-32724 is a critical vulnerability in the check-spelling GitHub Action that allows attackers to steal GITHUB_TOKEN secrets via crafted pull requests. This enables unauthorized commits to repositories, potentially exposing all repository secrets. Affected users are those using check-spelling action with pull_request_target or schedule triggers.
💻 Affected Systems
- check-spelling GitHub Action
📦 What is this software?
Check Spelling by Check Spelling
⚠️ Risk & Real-World Impact
Worst Case
Complete repository compromise: attacker gains write access, steals all repository secrets, injects malicious code, and potentially compromises downstream systems.
Likely Case
Unauthorized code commits leading to secret exfiltration and repository integrity breach.
If Mitigated
Limited to read-only access with no secret exposure if proper permissions are configured.
🎯 Exploit Status
Attack requires creating a malicious pull request to a vulnerable repository.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Commit 436362fc6b588d9d561cbdb575260ca593c8dc56 and later
Vendor Advisory: https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
Restart Required: No
Instructions:
1. Update check-spelling action to latest version using @main reference. 2. For pinned versions, update SHA to 436362fc6b588d9d561cbdb575260ca593c8dc56 or later. 3. Apply to all repository branches.
🔧 Temporary Workarounds
Disable vulnerable workflows
allTemporarily disable check-spelling workflows until patched
Restrict GitHub Actions
allSet repository to allow only specific verified actions
Reduce GITHUB_TOKEN permissions
allSet workflow permissions to read-only for repository contents
🧯 If You Can't Patch
- Disable check-spelling action entirely
- Remove pull_request_target and schedule triggers from affected workflows
- Implement manual spell checking processes
🔍 How to Verify
Check if Vulnerable:
Check workflow YAML files for check-spelling usage with pull_request_target or schedule triggers and verify version is pre-fix.
Check Version:
Inspect .github/workflows/*.yml files for check-spelling references and version/SHA
Verify Fix Applied:
Confirm workflow uses check-spelling@main or SHA 436362fc6b588d9d561cbdb575260ca593c8dc56 or later.
📡 Detection & Monitoring
Log Indicators:
- Unexpected GITHUB_TOKEN usage in pull request workflows
- Unauthorized commits from check-spelling action
Network Indicators:
- Unusual API calls from GitHub Actions to repository secrets
SIEM Query:
source="github-actions" AND action="check-spelling" AND trigger="pull_request_target"
🔗 References
- https://github.com/check-spelling/check-spelling/commit/436362fc6b588d9d561cbdb575260ca593c8dc56
- https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
- https://github.com/check-spelling/check-spelling/commit/436362fc6b588d9d561cbdb575260ca593c8dc56
- https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p