Skip to content
Advisory Intermediate

GHSL-2020-277: Unauthorized repository modification or secrets exfiltration in GitHub workflows of w3c/aria-practices

Two GitHub Actions workflows used the pull_request_target trigger but then checked out and ran code from the pull request's fork. An attacker could open a pull request that runs their own code with the base repository's write token and secrets, allowing them to modify the repository or steal secrets.

jarlob Follow

Originally disclosed on GitHub Security Lab

The coverage-report.yml and generate-and-commit-files.yml GitHub workflows are vulnerable to unauthorized modification of the base repository or secrets exfiltration from a Pull Request.

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 workflows combined the privileged pull_request_target trigger with an explicit checkout of the pull request head, so untrusted fork code ran with the base repository's token and secrets.

Impact

An attacker could modify the base repository without authorisation and exfiltrate secrets.

What the attacker needed

Attacker can open a pull request from a fork; workflow triggers on changed paths

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.

GitHub Actions are automated jobs that run when something happens on a repository, such as a pull request. The pull_request_target trigger was meant to let jobs act on pull requests safely, but here the job downloaded and ran code written by the person who opened the pull request. That code then had the repository's write access and its stored secrets, so a stranger could change the project or take its passwords.

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.