CVE-2024-52587: Harden-Runner has a command injection weaknesses in `setup.ts` and `arc-runner.ts`
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.64864%
CWE
Published
11/18/2024
Updated
11/19/2024
KEV Status
No
Technology
GitHub Actions
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
step-security/harden-runner | actions | < 2.10.2 | 2.10.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper use of execSync
with untrusted environment variables in shell commands. In setup.ts
, lines 169 and 229 directly interpolate USER
into shell commands without sanitization. In arc-runner.ts
, multiple functions (sendAllowedEndpoints, applyPolicy, etc.) use execSync
with getRunnerTempDir()
, which relies on the RUNNER_TEMP
environment variable. Attackers could manipulate these variables to inject arbitrary commands. The commit diff shows these were patched by replacing execSync
with safer methods like execFileSync
or Node.js filesystem APIs, confirming the vulnerable functions.