GHSL-2023-100: Command Injection in a GitHub Actions workflow of Apache Ignite
The Apache Ignite repository's GitHub Actions workflow used the fork's branch name directly in a shell command, allowing an attacker to inject arbitrary commands. An attacker could exploit this to steal secrets such as GITHUB_TOKEN and SONARCLOUD_TOKEN.
The apache/ignite repository is vulnerable to a command injection in Actions, allowing an attacker to leak secrets.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
This issue may lead to stealing workflow secrets.
What the attacker needed
GitHub account; Ability to fork the repository; Ability to create a pull request
The fix
A temporary fix was pushed.
How it was found
- Fork the apache/ignite repository.
- Create a branch in the fork with a name containing shell metacharacters and a command.
- Push a change to that branch.
- Create a pull request from that branch to apache/ignite:master.
- Observe the workflow run executing the injected command.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A GitHub Actions workflow ran a command that included the name of a branch from a fork. Because the branch name was not sanitised, an attacker could name their branch in a way that injected extra commands, which then ran with access to secret tokens.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.