GHSA-MXR3-8WHJ-J74R Harden-Runner allows evasion of ‘disable-sudo’ policy

Vulnerability Details

Basic Information

Title GHSA-MXR3-8WHJ-J74R Harden-Runner allows evasion of ‘disable-sudo’ policy
Type osv
Published 2025-04-22T01:07:03
Last Seen 2025-04-22T07:36:12
CVSS Score 6.0 (MEDIUM)

CVSS v3 Details

Attack Vector LOCAL
Attack Complexity LOW
Privileges Required HIGH
User Interaction NONE
Scope UNCHANGED
Confidentiality Impact NONE
Integrity Impact HIGH
Availability Impact HIGH

CVE Information

CVE IDs CVE-2025-32955
CWE
Bulletin Family software

Description

### Summary
Harden-Runner includes a policy option `disable-sudo` to prevent the GitHub Actions runner user from using sudo. This is implemented by removing the runner user from the sudoers file. However, this control can be bypassed as the runner user, being part of the docker group, can interact with the Docker daemon to launch privileged containers or access the host filesystem. This allows the attacker to regain root access or restore the sudoers file, effectively bypassing the restriction.

For an attacker to bypass this control, they would first need the ability to run their malicious code (e.g., by a supply chain attack similar to tj-actions or exploiting a Pwn Request vulnerability)) on the runner. This vulnerability has been fixed in Harden-Runner version `v2.12.0`.

### Impact
An attacker with the ability to run their malicious code on a runner configured with `disable-sudo: true` can escalate privileges to root using Docker, defeating the intended security control.

### Affected Configuration
• Harden-Runner configurations that use `disable-sudo: true` on GitHub-hosted runners or on ephemeral self-hosted VM-based runners.
• This issue does not apply to Kubernetes-based Actions Runner Controller (ARC) Harden-Runner.

### Mitigation / Fix
This vulnerability has been fixed in Harden-Runner version `v2.12.0`. Users should migrate to the stronger `disable-sudo-and-containers` policy. This setting:
• Disables sudo access,
• Removes access to dockerd and containerd sockets,
• Uninstalls Docker from the runner entirely, preventing container-based privilege escalation paths.

### Additional Improvements
• The `disable-sudo` option will be deprecated in the future, as it does not sufficiently restrict privilege escalation on its own.
• Harden-Runner now includes detections to alert on attempts to evade the `disable-sudo` policy.

### Credits
Reported by @loresuso and @darryk10. We would like to thank them for collaborating with us to mitigate the vulnerability.

Impact Assessment

Base Score 6.0
Severity MEDIUM

💭 Join the Security Discussion

🔒 Your email address will not be published. Required fields are marked *

⚠️ Please be respectful and constructive in your comments. Security discussions should remain professional.