A newly discovered vulnerability in GitHub Actions artifacts, named ArtiPACKED, poses a significant threat to repository security. This attack vector can be exploited to take over repositories and gain access to organizations’ cloud environments. The issue arises from a combination of misconfigurations and security flaws that allow artifacts to leak sensitive tokens, including those from third-party cloud services and GitHub itself.
These leaked tokens can be accessed by anyone with read access to the repository, potentially leading to serious security breaches. Palo Alto Networks’ Unit 42 researcher Yaron Avital highlighted that malicious actors could use these exposed artifacts to compromise services connected to the leaked secrets. This could result in unauthorized access to repositories, enabling attackers to poison source code and push malicious changes through CI/CD workflows.
The primary concern is the exposure of GitHub tokens like GITHUB_TOKEN and ACTIONS_RUNTIME_TOKEN, which can provide attackers with significant control over repositories. Artifacts in GitHub are designed to share data between jobs in a workflow, storing information such as builds, log files, and deployment packages for up to 90 days. However, the security risk emerges when these artifacts, especially in open-source projects, are publicly accessible. A particular threat is the exposure of the ACTIONS_RUNTIME_TOKEN, which can be used by attackers to replace an artifact with a malicious version, leading to remote code execution when developers download or use the compromised artifact. GitHub has categorized the issue as informational, meaning it requires users to take responsibility for securing their uploaded artifacts.
The vulnerability has been found in several open-source repositories associated with major companies like Amazon Web Services, Google, Microsoft, Red Hat, and Ubuntu. Avital urged organizations to reevaluate their use of GitHub’s artifact mechanism, especially following the deprecation of Artifacts V3, to mitigate the risk of these overlooked elements becoming prime targets for attackers.
Reference:
- https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/