Researchers at security company Legit Security have discovered that an attacker is pushing changes to an open source repository on GitHub. This can cause software projects that include the latest version of a component to compile updates with malicious code.
This artifact poisoning vulnerability could affect software projects using GitHub Actions (a service for automating development pipelines) by triggering the build process at the moment a change is detected in a software dependency, experts say.
Legit Security simulated an attack on the project that Rust is based on, resulting in the project being recompiled using a malicious version of the popular GCC software library.
The attack uses an automated build process via GitHub Actions. A vulnerable pattern could allow an attacker to execute code in a privileged manner within the development pipeline, stealing repository secrets and spoofing code.
In other words, in a vulnerable workflow, any GitHub user can create a fork that will create an artifact. Then you need to inject this artifact into the original repository build process and modify its output.
Once exploited, an attacker can modify repository branches, pull requests, exploit bugs, releases, and all objects available for workflow token permissions. Since Rust did not restrict the workflow token to certain areas, the following permissions are available to a hacker:
Depending on the specific configuration of Rust, a cybercriminal can use these permissions to extend the attack beyond the vulnerable repository to additional Rust assets and lateral movement within the organization.
Legit Security CTO Liav Caspi said the problem affects a large number of open source projects because maintainers typically test the provided code first and analyze it after the tests.
GitHub has confirmed the issue and paid a reward for the information, and Rust has already patched the vulnerability.
Comments 0