HomeCyberSecurity NewsGitHub Vulnerability 'ArtiPACKED' Puts Repositories at Risk of Takeover

GitHub Vulnerability ‘ArtiPACKED’ Puts Repositories at Risk of Takeover

A recently discovered vulnerability in GitHub Actions artifacts, known as ArtiPACKED, has the potential to compromise repositories and gain unauthorized access to organizations’ cloud environments.

Palo Alto Networks Unit 42 researcher Yaron Avital stated in a report published this week that “a mix of misconfigurations and security vulnerabilities can lead to the exposure of artifacts containing tokens, such as third-party cloud services and GitHub tokens, allowing individuals with read access to the repository to exploit them.”

According to the cybersecurity company, the leakage of GitHub tokens (e.g., GITHUB_TOKEN and ACTIONS_RUNTIME_TOKEN) was primarily observed, granting malicious actors not only unauthorized access to repositories but also the ability to tamper with source code and have it deployed to production through CI/CD workflows.

GitHub allows users to share and persist data through artifacts for up to 90 days, which can range from builds and log files to deployment packages and test outputs. The concern arises from the fact that these artifacts are publicly accessible in open-source projects, making them a potential source of valuable information like GitHub access tokens.

Notably, artifacts have been found to expose an undocumented environment variable called ACTIONS_RUNTIME_TOKEN, which has a lifespan of approximately six hours and can be exploited to substitute an artifact with a malicious version before it expires, introducing a window for remote code execution.

While GITHUB_TOKEN expires at the end of a job, recent updates to artifacts in version 4 have created race condition scenarios that could allow attackers to steal and utilize the token by downloading an artifact while a workflow run is in progress.

The stolen token could then be used to inject malicious code into the repository by creating a new branch before the token expires, assuming the workflow has the necessary “contents: write” permission.

Various open-source repositories related to Amazon Web Services (AWS), Google, Microsoft, Red Hat, and Ubuntu were found to be vulnerable to this attack. GitHub has labeled this issue as informational, urging users to secure their uploaded artifacts diligently.

Avital recommended that organizations reevaluate their use of the artifacts mechanism, particularly with GitHub deprecating Artifacts V3, as overlooked elements like build artifacts can become attractive targets for attackers.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest News