CVE-2024-52587

8.8 HIGH

📋 TL;DR

StepSecurity's Harden-Runner versions before 2.10.2 contain command injection vulnerabilities via environment variables that could allow attackers to execute arbitrary commands on GitHub Actions runners. This affects organizations using Harden-Runner for security hardening of their CI/CD pipelines. The risk is reduced because Harden-Runner typically runs as the first step in GitHub Actions jobs.

💻 Affected Systems

Products:
  • StepSecurity Harden-Runner
Versions: All versions prior to v2.10.2
Operating Systems: All platforms where Harden-Runner runs
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in default configuration but exploitation requires specific conditions and control of environment variables.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full compromise of GitHub Actions runner with ability to execute arbitrary commands, steal secrets, modify code, and pivot to internal systems.

🟠

Likely Case

Limited impact due to execution order constraints; potential for command execution if environment variables can be controlled by attackers.

🟢

If Mitigated

Minimal impact when using patched version or when Harden-Runner runs as first step with controlled environment variables.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires control of environment variables and specific conditions; no known exploits currently exist.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v2.10.2

Vendor Advisory: https://github.com/step-security/harden-runner/security/advisories

Restart Required: No

Instructions:

Update GitHub Actions workflow to use 'step-security/harden-runner@v2.10.2' or later
Replace any references to older versions with the patched version
No restart required - changes take effect on next workflow run

🔧 Temporary Workarounds

Pin to specific safe version

all

Explicitly use a vulnerable version while planning upgrade

uses: step-security/harden-runner@v2.9.0

Remove Harden-Runner temporarily

all

Temporarily disable Harden-Runner while planning upgrade

# Remove or comment out the Harden-Runner step in your workflow

🧯 If You Can't Patch

  • Restrict environment variable access in GitHub Actions workflows
  • Implement additional security monitoring for runner activities

🔍 How to Verify

Check if Vulnerable:

Check GitHub Actions workflow YAML files for 'step-security/harden-runner' usage with version below 2.10.2

Check Version:

grep -r 'step-security/harden-runner' .github/workflows/

Verify Fix Applied:

Confirm workflow uses 'step-security/harden-runner@v2.10.2' or later

📡 Detection & Monitoring

Log Indicators:

  • Unusual command execution patterns in GitHub Actions logs
  • Environment variable manipulation in pre-step stages

Network Indicators:

  • Unexpected outbound connections from GitHub Actions runners

SIEM Query:

source="github-actions" AND "harden-runner" AND (version<2.10.2 OR suspicious_command_execution)

🔗 References

📤 Share & Export