GHSL-2024-159: Poisoned Pipeline Execution (PPE) in an Actions workflow of Element+
The publish-docs-deploy workflow checked out the head commit of a pull request and then ran a package script with a secret token in its environment. An attacker could open a pull request that changes the workflow trigger and the script, causing arbitrary commands to run with write access to the repository and the CROWDIN_TOKEN secret.
Originally disclosed on GitHub Security Lab
Element+ is vulnerable to Poisoned Pipeline Execution (PPE) which may allow an attacker to gain write acces to the repository and the CROWDINTOKEN token.
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
Root cause
The workflow checked out and executed code from an untrusted pull request while running with write-all permissions and access to a secret.
Impact
An attacker could gain full write access to the repository and steal secrets, including the CROWDIN_TOKEN.
What the attacker needed
Ability to open a pull request
How it was found
- Open a pull request that changes the publish-npm workflow to trigger on pull_request.
- In the same pull request, change the docs:crowdin-credentials script in package.json to run arbitrary commands.
- The pull request triggers the vulnerable workflow, which checks out the pull request head and runs the modified script with the secret token.
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 is an automated script that runs when something happens in a repository, such as a pull request. This workflow trusted code from a pull request and ran it while holding a secret token, so anyone who could open a pull request could make the automation run their own commands. That gave them the same powers as the automation, including writing to the repository and reading the token.