CVE-2025-32955 in harden-runnerinfo

Summary

by MITRE • 04/22/2025

Harden-Runner is a CI/CD security agent that works like an EDR for GitHub Actions runners. Versions from 0.12.0 to before 2.12.0 are vulnerable to `disable-sudo` bypass. 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. This issue has been patched in version 2.12.0.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 04/22/2025

The vulnerability identified as CVE-2025-32955 affects Harden-Runner, a critical security agent designed to provide endpoint detection and response capabilities for GitHub Actions CI/CD environments. This tool operates as a security control that monitors and enforces security policies on GitHub Actions runners, making it a crucial component in protecting continuous integration pipelines from malicious activities. The vulnerability specifically resides in versions between 0.12.0 and before 2.12.0, where the security mechanism intended to prevent privilege escalation through sudo commands has been successfully circumvented. The affected system implements a policy option called `disable-sudo` which is designed to remove runner user accounts from the sudoers file, thereby preventing them from executing commands with elevated privileges. However, this security control suffers from a fundamental design flaw that creates an exploitable pathway through the containerization infrastructure that the runner utilizes. The vulnerability stems from the fact that the runner user, while lacking direct sudo privileges, is granted membership in the docker group, which creates a critical security boundary violation that allows for privilege escalation.

The technical exploitation of this vulnerability occurs through containerization abuse techniques that leverage the Docker daemon access granted to the runner user. When a runner user with docker group membership attempts to interact with the Docker daemon, they can launch privileged containers that operate with elevated permissions on the host system. This privileged container execution creates a direct pathway to the underlying host filesystem, allowing the attacker to access system resources that would normally be restricted. The bypass mechanism operates by first establishing a privileged container that can access the host filesystem, then either directly modifying or restoring the sudoers file that was previously removed, or by executing commands that gain root access to the system. This represents a classic container escape vulnerability where container isolation is violated through legitimate but misconfigured group memberships. The attack vector specifically exploits the principle of least privilege violation, where the container runtime environment provides access that exceeds the intended security boundaries. This type of vulnerability is categorized under CWE-276 as improper privileges and CWE-787 as out-of-bounds write, representing both privilege escalation and boundary condition failures in the security control implementation.

The operational impact of this vulnerability extends beyond simple privilege escalation, as it fundamentally undermines the security posture of CI/CD pipelines that rely on Harden-Runner for protection. Attackers who successfully exploit this vulnerability can effectively bypass the entire security framework designed to protect GitHub Actions runners, gaining root access to the host system where build processes execute. This creates a severe risk for organizations that depend on automated CI/CD workflows, as the attacker can now access sensitive build artifacts, credentials stored in environment variables, and potentially compromise the entire software supply chain. The vulnerability allows for persistent access to the build environment, enabling attackers to modify build processes, inject malicious code into the pipeline, or exfiltrate confidential information. Furthermore, the bypass mechanism is particularly concerning because it operates silently within the legitimate container execution framework, making detection more difficult and allowing for long-term persistence within the CI/CD environment. This vulnerability aligns with ATT&CK technique T1059.001 for command and scripting interpreter and T1566.001 for credential access, as it enables both command execution and credential compromise within the build infrastructure.

Mitigation strategies for CVE-2025-32955 must address both the immediate vulnerability and the underlying architectural issues that enable the bypass. Organizations should immediately upgrade to Harden-Runner version 2.12.0 or later, which contains the necessary patches to prevent the sudo bypass mechanism. Beyond the immediate upgrade, system administrators should implement additional security controls such as restricting docker group membership for runner users, implementing container runtime security policies that prevent privileged container execution, and establishing network segmentation between build environments and sensitive systems. The security architecture should also include monitoring for unusual container activity patterns and privileged container launches that could indicate exploitation attempts. Additionally, organizations should consider implementing more granular access controls that separate the build execution environment from the host system, potentially through the use of container runtime security tools that enforce stricter isolation policies. The solution should also include regular security assessments of CI/CD environments to identify similar privilege escalation pathways and ensure that security controls are properly configured to prevent the type of group membership abuse that enables this vulnerability. This vulnerability demonstrates the critical importance of proper privilege management in containerized environments and the need for comprehensive security controls that address both traditional user permissions and container runtime access controls.

Responsible

GitHub M

Reservation

04/14/2025

Disclosure

04/22/2025

Moderation

accepted

EPSS

0.00226

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!