RCE + Supply Chain Attack via pull_request_target in content-scope-scripts/semver-label.yml — Affects All DuckDuckGo Browsers
A GitHub Actions workflow in a DuckDuckGo repository used the pull_request_target trigger while checking out and building code from fork pull requests, so any GitHub user could run arbitrary code on the runner. This allowed theft of an API key from the environment and misuse of the workflow token to add release labels, which the reporter says could feed a poisoned release to DuckDuckGo browsers.
- Triaged in 52 days
- Fixed in 52 days
- Disclosed after 3 months
Summary
The duckduckgo/content-scope-scripts repository's .github/workflows/semver-label.yml GitHub Actions workflow uses pull_request_target trigger without any access controls, checks out and executes untrusted fork PR code via npm install + npm run build, and subsequently runs a trusted script with ANTHROPIC_API_KEY in the environment. An attacker can exfiltrate the API key, abuse the GITHUB_TOKEN (which has pull-requests: write) to manipulate semver labels on any PR, and chain into the automated release pipeline (semver-release.yml → build.yml) to publish a poisoned release consumed by every DuckDuckGo browser and extension across all platforms.
The content-scope-scripts README describes this package as "shared JavaScript used within ALL DuckDuckGo browsers."
This report contains 4 findings:
- RCE + ANTHROPIC_API_KEY exfiltration via
semver-label.yml - Supply chain attack via label manipulation → release pipeline
- DAX_PAT exposure via related
pull_request_targetworkflows - 10 workflows using
pull_request_targetacross the DuckDuckGo org
Vulnerability Details
Root Cause
pull_request_target runs in the context of the BASE repository with access to secrets. The workflow checks out and executes code from the PR HEAD (attacker-controlled on fork PRs). There are zero access controls — any GitHub user can trigger this by opening a fork PR.
Vulnerable Workflow (semver-label.yml)
Impact
-
RCE + Secret Exfiltration: Any GitHub user can execute arbitrary code on the Actions runner by opening a fork PR. ANTHROPIC_API_KEY is directly exfiltrable, enabling API abuse at DuckDuckGo's expense.
-
Release Pipeline Manipulation: GITHUB_TOKEN with pull-requests:write can add semver labels to any PR, triggering the automated release pipeline on merge. The attacker controls when releases happen.
-
Supply Chain Compromise — All DuckDuckGo Browsers: content-scope-scripts is "shared JavaScript used within ALL DuckDuckGo browsers." A poisoned release propagates to Android, iOS, macOS, Windows browsers, Chrome extension, Firefox extension, and the autofill component — affecting tens of millions of users across every platform DuckDuckGo supports.
-
No Release Signing: build.yml creates releases with no code signing or integrity verification. Downstream consumers pull from the releases branch with no signature validation.
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 combined the privileged pull_request_target trigger, which exposes repository secrets, with checking out and executing untrusted fork pull request code, and had no access controls.
Impact
An attacker could steal the API key and manipulate release labels, which the reporter claims could lead to a poisoned release reaching all DuckDuckGo browsers; the text does not show a release actually being published.
What the attacker needed
Any GitHub account; ability to open a fork pull request
How it was found
- Open a fork pull request against the repository to trigger the workflow.
- The workflow checks out the pull request's head code and runs the install and build steps.
- The attacker's code executes on the runner with the API key present in the environment.
- The attacker's code uses the workflow token to add semver labels to pull requests.
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 in a code repository, such as a pull request being opened. One trigger, pull_request_target, runs the job with the repository's own secrets, and if that job also downloads and runs the contributor's code, the contributor's code gets the secrets too. Here that meant a stranger could run their own commands inside DuckDuckGo's automation and read a private API key.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.