Skip to content
Advisory Intermediate

GHSL-2024-017: Unauthorized repository modification and secrets exfiltration in Redash

The Redash CI workflow used the pull_request_target trigger with a write-permission repository token and checked out and ran code from pull requests in a privileged context. An attacker could open a pull request to run untrusted code with that token and access secrets, leading to unauthorised repository modification or exfiltration of secrets such as the Docker password.

jarlob Follow

Originally disclosed on GitHub Security Lab

Insecure usage of pullrequesttarget makes Redash repository vulnerable to an unauthorized repository modification or secrets exfiltration.

jarlob, on GitHub Security Lab

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 used the pull_request_target trigger, which grants a write token and secrets, and then checked out and executed code from the pull request in that privileged context.

Impact

An attacker could modify the repository without authorisation or exfiltrate secrets, including the Docker password.

What the attacker needed

Attacker can open a pull request; workflow runs on pull_request_target

The fix

The issue was fixed in pull request 7298.

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 a set of automated steps that run when something happens in a repository. The pull_request_target trigger runs those steps in the context of the main repository, so it gets a powerful token and access to secrets. If the workflow then checks out and runs code from the incoming pull request, an outsider can make that code do things like change the repository or steal secrets.

More by jarlob

View all

192 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.