Skip to content
Access control Advisory Intermediate

GHSL-2024-266_GHSL-2024-267: Poisoned Pipeline Execution via Environment Variable Injection in Adobe React Spectrum Charts

The pr-sonar.yml workflow in Adobe's react-spectrum-charts repository trusted artifacts from a pull request build, allowing an attacker to inject environment variables and execute arbitrary code. This gave the attacker write access to the repository and the ability to exfiltrate organisation-level secrets.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

Adobe’s react-spectrum-charts GitHub repository is vulnerable to Poisoned Pipeline Execution via Environment Variable Injection in its pr-sonar.yml workflow. A malicious actor could gain full-write permissions to the repository and access to the https://github/adobe organization secrets.

pwntester, 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 untrusted artifact contents to set environment variables without sanitising newlines, and also interpolated attacker-controlled values directly into a shell script.

What the attacker needed

GitHub account; Ability to fork the repository; Ability to open a pull request

The fix

The vulnerable workflow was first disabled and later removed.

How it was found

  1. Fork the repository and create a new branch.
  2. Modify the pr-build.yml workflow to upload a malicious artifact containing a newline and a BASH_ENV variable.
  3. Submit a pull request from the fork.
  4. The modified workflow runs and uploads the malicious artifact, then triggers the vulnerable workflow.
  5. Observe the output of the 'Checkout base branch' step to confirm code execution.

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, like a pull request. Here, a workflow that runs after another workflow trusted files uploaded by the first one, and an attacker could put special instructions in those files to run their own commands. This let them take control of the repository and steal secret keys.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.