Skip to content
RCE Disclosed report Intermediate

RCE + PAT Exfiltration via pull_request_target in privacy-configuration/auto-respond-pr.yml — Direct Supply Chain to All DDG Browsers

A GitHub Actions workflow in a DuckDuckGo repository used the privileged pull_request_target trigger but checked out the fork's code as the base branch and then ran npm install and a node script on it. An attacker could therefore run their own code on the runner and steal a personal access token used for PR auto-approval, plus other tokens exposed when a fork PR is closed.

6r1ff1n Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 34 days
  • Fixed in 34 days
  • Disclosed after 3 months

Summary

The duckduckgo/privacy-configuration repository's .github/workflows/auto-respond-pr.yml GitHub Actions workflow uses pull_request_target trigger, checks out the fork's repository as both "base" and "PR" branches (attacker controls both), then executes npm ci + node index.js on the attacker-controlled code. The PRIVACY_CONFIG_PAT secret — a Personal Access Token used for PR auto-approval — is exposed in subsequent workflow steps. Additionally, the sync_asana_on_close job unconditionally exposes ASANA_ACCESS_TOKEN and GH_RO_PAT when any PR (including fork PRs) is closed.

This is a separate vulnerability from the previously reported content-scope-scripts/semver-label.yml finding. Different repository, different secrets, different attack path, and a shorter supply chain — privacy-configuration is consumed via a floating main branch dependency with no tag or SHA pinning.


Vulnerability Details

Root Cause

The workflow uses pull_request_target (privileged context with secrets) and contains two critical flaws:

  1. Fork checkout as "base": The base branch checkout uses repository: ${{ github.event.pull_request.head.repo.full_name }} — this checks out the fork's repo, not the actual base. The attacker controls BOTH checkouts.
  2. Arbitrary code execution: npm ci and node index.js run on fork code with PRIVACY_CONFIG_PAT available in subsequent steps.

Vulnerable Workflow (auto-respond-pr.yml)


Cross-reference: This vulnerability is separate from report #3619287 (content-scope-scripts/semver-label.yml). Different repository, different secrets, different attack path, and a shorter supply chain.

Impact

  1. RCE + PRIVACY_CONFIG_PAT Theft: Any GitHub user can execute arbitrary code on the Actions runner by opening a fork PR. The PRIVACY_CONFIG_PAT — used for PR auto-approval — is exfiltrable. This PAT likely has repo scope, enabling the attacker to approve their own PRs, push to branches, and access private repository contents.

  2. Base Branch Impersonation: The "base" checkout retrieves the fork's code, not the real base. Any diff-based validation is defeated. The attacker controls 100% of the code the workflow operates on.

  3. Direct Supply Chain — All DuckDuckGo Browsers: privacy-configuration controls tracker blocking, fingerprint protection, and privacy features for ALL DDG browsers. The duckduckgo-privacy-extension uses a floating main dependency with no tag or SHA pin. An attacker who steals PRIVACY_CONFIG_PAT can approve and merge a malicious PR to main, and the poisoned configuration propagates directly into the next build of every DuckDuckGo product — Android, iOS, macOS, Chrome extension, Firefox extension.

  4. Silent Privacy Degradation: Unlike code injection (which may crash or behave visibly), a poisoned privacy configuration can silently disable tracker blocking or fingerprint protections for all users without any visible indicator. Users would believe they are protected while their privacy protections are disabled.

  5. Additional Secrets: ASANA_ACCESS_TOKEN and GH_RO_PAT are unconditionally exposed when any fork PR is closed, enabling access to DuckDuckGo's Asana project management and GitHub read access.

The original report as published on HackerOne, by 6r1ff1n. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

The target is the duckduckgo/privacy-configuration repository, and specifically its GitHub Actions workflow .github/workflows/auto-respond-pr.yml. The workflow reacts to pull requests and, in a second job, to pull request closure. The report describes it as using the pull_request_target trigger, which runs in the privileged context of the base repository and therefore has access to repository secrets.

The asset named by the platform is https://github.com/duckduckgo/duckduckgo-privacy-extension, which consumes privacy-configuration. According to the report, that consumption happens through a floating main branch dependency with no tag or SHA pinning, which the report links to the supply chain consequence once a stolen PAT is used to merge to main.

The researcher is 6r1ff1n, the report was disclosed on HackerOne on 2026-06-11, and the platform rates it critical. The report itself gives no CVSS vector and no weakness classification.

Setup

The report describes no accounts, tooling or versions. The precondition it does state is simply that any GitHub user can open a fork pull request against the repository, which is enough to reach the vulnerable workflow. No special role or prior access is required.

Finding it

What the researcher noticed is the combination of three things in one workflow:

  1. The workflow is triggered with pull_request_target, so it runs with secrets available.
  2. The base branch checkout is not the real base. It uses repository: ${{ github.event.pull_request.head.repo.full_name }}, which checks out the fork's repository as the "base". The attacker therefore controls both the "base" and the "PR" checkouts.
  3. The workflow then runs npm ci and node index.js on that attacker-controlled code, with PRIVACY_CONFIG_PAT available in subsequent steps.

A second issue sits in the same file: the sync_asana_on_close job unconditionally exposes ASANA_ACCESS_TOKEN and GH_RO_PAT when any PR, including a fork PR, is closed.

The report is explicit that this is a separate vulnerability from a previously reported finding in content-scope-scripts/semver-label.yml (report #3619287): different repository, different secrets, different attack path, and a shorter supply chain.

Exploitation

Step 1: open a fork pull request

Any GitHub user forks the repository and opens a pull request. Because the workflow uses pull_request_target, the run is triggered in the privileged context with the repository's secrets available to later steps.

Step 2: control both checkouts

The base checkout is pointed at the fork rather than the real base:

Text
repository: ${{ github.event.pull_request.head.repo.full_name }}

This expression resolves to the head repository of the pull request, that is, the fork. The result is that the workflow's "base" checkout retrieves the fork's code, not the actual base branch. Any diff-based validation the workflow might rely on is defeated, because the attacker controls 100% of the code the workflow operates on.

Step 3: execute attacker code on the runner

The workflow then runs the standard Node install and entry point against that code:

Bash
npm ci
node index.js

npm ci and node index.js run on the attacker-controlled code. Both execute on the Actions runner. The report does not include the surrounding YAML or the output of these commands; the point is that arbitrary code of the attacker's choosing runs in the privileged job.

Step 4: exfiltrate PRIVACY_CONFIG_PAT

With code execution in place, the PRIVACY_CONFIG_PAT secret, described as a Personal Access Token used for PR auto-approval, is exposed in subsequent workflow steps and can be exfiltrated. The report does not show the exfiltration request or the token value.

Step 5: harvest the close-triggered secrets

The sync_asana_on_close job exposes ASANA_ACCESS_TOKEN and GH_RO_PAT unconditionally whenever any PR, including a fork PR, is closed. The job exposes those two secrets whenever any PR, including a fork PR, is closed.

Root cause

The mistake is the use of pull_request_target, a trigger that runs with secrets, together with a checkout that trusts attacker-supplied repository metadata. The base checkout expression repository: ${{ github.event.pull_request.head.repo.full_name }} makes the "base" side of the workflow come from the fork, so the usual assumption that the base is trusted does not hold. On top of that, the workflow executes npm ci and node index.js on that code while PRIVACY_CONFIG_PAT is available to later steps.

The sync_asana_on_close job repeats the pattern in a different form: it exposes ASANA_ACCESS_TOKEN and GH_RO_PAT on any PR close, with no condition restricting it to trusted PRs.

The report does not describe any defence that was present and failed.

Impact

The report lists five consequences.

  1. RCE and PRIVACY_CONFIG_PAT theft. Any GitHub user can execute arbitrary code on the Actions runner by opening a fork PR, and the PRIVACY_CONFIG_PAT used for PR auto-approval is exfiltrable. The report says this PAT likely has repo scope, which would let the attacker approve their own PRs, push to branches, and access private repository contents.
  2. Base branch impersonation. Because the "base" checkout retrieves the fork's code, diff-based validation is defeated and the attacker controls all of the code the workflow operates on.
  3. Direct supply chain to all DuckDuckGo browsers. privacy-configuration controls tracker blocking, fingerprint protection and privacy features for all DDG browsers. The duckduckgo-privacy-extension uses a floating main dependency with no tag or SHA pin. An attacker who steals PRIVACY_CONFIG_PAT can approve and merge a malicious PR to main, and the poisoned configuration propagates directly into the next build of every DuckDuckGo product: Android, iOS, macOS, the Chrome extension and the Firefox extension.
  4. Silent privacy degradation. Unlike code injection, which may crash or behave visibly, a poisoned privacy configuration can silently disable tracker blocking or fingerprint protections for all users with no visible indicator. Users would believe they are protected while their protections are disabled.
  5. Additional secrets. ASANA_ACCESS_TOKEN and GH_RO_PAT are unconditionally exposed when any fork PR is closed, giving access to DuckDuckGo's Asana project management and GitHub read access.

These outcomes depend on the stated conditions: the attacker must be able to open a fork PR, and the supply chain consequence depends on the floating main dependency and on the stolen PAT being usable to approve and merge to main.

Fix

What it identifies as needing correction is the workflow design: a privileged trigger combined with a checkout of attacker-controlled code, execution of that code with secrets available, and a close-triggered job that exposes secrets for any PR.

Variants to test

  • pull_request_target with a fork-controlled checkout. Look for workflows using pull_request_target whose checkout uses github.event.pull_request.head.repo.full_name or similar head-repository expressions for the base side. A positive result is a run where the checked-out "base" content comes from the fork.
  • Build or script execution after a privileged checkout. Look for npm ci, npm install, node, make or similar steps running after a pull_request_target checkout of fork code. A positive result is attacker-controlled code executing in a job that has secrets available to later steps.
  • Secrets available to later steps. Trace which secrets are referenced after the untrusted execution step. A positive result is a token such as a PAT being readable by code that ran from the fork.
  • Close-triggered jobs. Look for jobs triggered on PR close that reference secrets without restricting to trusted PRs. A positive result is a fork PR close that reaches a job holding tokens such as an access token or a read-only PAT.
  • Floating branch dependencies. Check whether a downstream repository consumes the configuration through a floating branch with no tag or SHA pin. A positive result is a dependency that would pick up a merged change on the next build without any pinning step.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

DuckDuckGo runs a public code repository called privacy-configuration. It controls tracker blocking, fingerprint protection and privacy features for all DuckDuckGo browsers. The repository has an automatic helper attached to it: a small robot that reacts whenever someone proposes a change to the code. On GitHub, a proposed change is called a pull request, or PR, and the robot that reacts to it is a GitHub Actions workflow.

The researcher, 6r1ff1n, found that this robot can be tricked into running code written by a stranger, and that while it runs that code it also has access to secret passwords (tokens) belonging to DuckDuckGo. The platform rates the issue critical. The report was disclosed on HackerOne on 2026-06-11. It gives no CVSS score and no formal weakness category.

The report also stresses that this is a different problem from an earlier finding in a different repository, content-scope-scripts/semver-label.yml, tracked as report #3619287. Different repository, different secrets, different attack path, and a shorter supply chain.

Some background before the details

What a repository and a pull request are

A repository is a folder of code stored on a service like GitHub, with a full history of every change. Anyone can usually copy (fork) a public repository into their own account, change it there, and then ask the original project to take their changes. That request is a pull request. The person proposing the change is the contributor; the project that receives it is the base.

What GitHub Actions and a workflow are

GitHub Actions is GitHub's built-in automation. A workflow is a recipe file, written in YAML, that says: when event X happens, run these commands on a fresh computer provided by GitHub. That computer is called a runner. Workflows are handy for chores like running tests or labelling pull requests automatically.

What a secret and a token are

A secret is a password-like value stored in the repository settings and handed to workflows at run time. A token (often a Personal Access Token, PAT) is a long random string that acts like a key: whoever holds it can do things on GitHub as the account that created it, without needing the account's password. Think of a hotel key card: it opens specific doors, and if someone copies it they can come back later.

What pull_request_target means

Workflows can be started by different events. One event is pull_request, which runs the workflow on the contributor's proposed code in a restricted, safe context with no secrets. Another is pull_request_target, which runs in the privileged context of the base repository, with the project's secrets available. pull_request_target exists so maintainers can do things like label a PR or post a comment, which needs write access. The catch is that anything the workflow then runs must be treated as dangerous, because the contributor controls part of the input.

What npm ci and node index.js are

Node.js is a programming language runtime. npm is its package manager, the tool that downloads the libraries a project depends on. npm ci installs exactly the dependencies listed in a lockfile. node index.js runs the file named index.js, which is the program's entry point. In short: install the project's ingredients, then run the project.

What a supply chain is

A supply chain is the chain of dependencies a product is built from. If an attacker can slip something bad into one link, every product built from that chain inherits it. Here the chain runs from privacy-configuration into the DuckDuckGo browsers.

The setup the report assumes

The report describes no accounts, tools or software versions. The only precondition it states is that any GitHub user can open a fork pull request against the repository. No special role or prior access is needed. That is the whole entry ticket.

How the researcher found it

The researcher noticed three things combined in one workflow:

  1. The workflow is triggered with pull_request_target, so it runs with secrets available.
  2. The base checkout is not the real base. It uses repository: ${{ github.event.pull_request.head.repo.full_name }}, which checks out the fork's repository as the "base". The attacker therefore controls both the "base" and the "PR" checkouts.
  3. The workflow then runs npm ci and node index.js on that attacker-controlled code, with PRIVACY_CONFIG_PAT available in subsequent steps.

A second issue sits in the same file: the sync_asana_on_close job unconditionally exposes ASANA_ACCESS_TOKEN and GH_RO_PAT when any PR, including a fork PR, is closed.

Walking through the attack

Step 1: open a fork pull request

Any GitHub user forks the repository and opens a pull request. Because the workflow uses pull_request_target, the run is triggered in the privileged context, with the repository's secrets available to later steps. Any GitHub user can open a fork pull request.

Step 2: control both checkouts

The base checkout is pointed at the fork rather than the real base:

Text
repository: ${{ github.event.pull_request.head.repo.full_name }}

Line by line:

  • repository: is the setting that tells the checkout step which repository to download.
  • ${{ ... }} is GitHub's syntax for inserting a value computed at run time.
  • github.event.pull_request.head.repo.full_name is the full name (owner and repository) of the repository the pull request came from, that is, the fork.

So the workflow's "base" checkout retrieves the fork's code, not the actual base branch. Any diff-based validation the workflow might rely on is defeated, because the attacker controls 100% of the code the workflow operates on. The everyday comparison: a bank teller is supposed to compare your signature against the one on file, but here the "on file" copy is supplied by the customer.

Step 3: execute attacker code on the runner

The workflow then runs the standard Node install and entry point against that code:

Bash
npm ci
node index.js

Line by line:

  • npm ci installs the project's dependencies from the fork's code.
  • node index.js runs the fork's code on the runner.

Both execute on the Actions runner. The report does not include the surrounding YAML or the output of these commands; the point is that arbitrary code of the attacker's choosing runs in the privileged job. This is what security people call remote code execution, or RCE: someone else's code running on your machine.

Step 4: exfiltrate PRIVACY_CONFIG_PAT

With code execution in place, the PRIVACY_CONFIG_PAT secret, described as a Personal Access Token used for PR auto-approval, is exposed in subsequent workflow steps and can be exfiltrated. Exfiltration simply means sending the stolen value out to a server the attacker controls. The report does not show the exfiltration request or the token value.

Step 5: harvest the close-triggered secrets

The sync_asana_on_close job exposes ASANA_ACCESS_TOKEN and GH_RO_PAT unconditionally whenever any PR, including a fork PR, is closed. Closing the pull request from step 1 is therefore enough to reach those two secrets as well. The report links these to DuckDuckGo's Asana project management and GitHub read access.

Why it works

The mistake is the use of pull_request_target, a trigger that runs with secrets, together with a checkout that trusts attacker-supplied repository metadata. The base checkout expression repository: ${{ github.event.pull_request.head.repo.full_name }} makes the "base" side of the workflow come from the fork, so the usual assumption that the base is trusted does not hold. On top of that, the workflow executes npm ci and node index.js on that code while PRIVACY_CONFIG_PAT is available to later steps.

The sync_asana_on_close job repeats the pattern in a different form: it exposes ASANA_ACCESS_TOKEN and GH_RO_PAT on any PR close, with no condition restricting it to trusted PRs.

The report does not describe any defence that was present and failed.

What the attacker could do with it

The report lists five consequences.

  1. RCE and PRIVACY_CONFIG_PAT theft. Any GitHub user can execute arbitrary code on the Actions runner by opening a fork PR, and the PRIVACY_CONFIG_PAT used for PR auto-approval is exfiltrable. The report says this PAT likely has repo scope, which would let the attacker approve their own PRs, push to branches, and access private repository contents.
  2. Base branch impersonation. Because the "base" checkout retrieves the fork's code, diff-based validation is defeated and the attacker controls all of the code the workflow operates on.
  3. Direct supply chain to all DuckDuckGo browsers. privacy-configuration controls tracker blocking, fingerprint protection and privacy features for all DDG browsers. The duckduckgo-privacy-extension uses a floating main dependency with no tag or SHA pin. An attacker who steals PRIVACY_CONFIG_PAT can approve and merge a malicious PR to main, and the poisoned configuration propagates directly into the next build of every DuckDuckGo product: Android, iOS, macOS, the Chrome extension and the Firefox extension. A floating dependency has no tag or SHA pin, so a merged change is picked up on the next build.
  4. Silent privacy degradation. Unlike code injection, which may crash or behave visibly, a poisoned privacy configuration can silently disable tracker blocking or fingerprint protections for all users with no visible indicator. Users would believe they are protected while their protections are disabled. The everyday comparison: a home alarm that still shows a green light but no longer calls anyone.
  5. Additional secrets. ASANA_ACCESS_TOKEN and GH_RO_PAT are unconditionally exposed when any fork PR is closed, giving access to DuckDuckGo's Asana project management and GitHub read access.

These outcomes depend on the stated conditions: the attacker must be able to open a fork PR, and the supply chain consequence depends on the floating main dependency and on the stolen PAT being usable to approve and merge to main.

Was it fixed?

What it identifies as needing correction is the workflow design: a privileged trigger combined with a checkout of attacker-controlled code, execution of that code with secrets available, and a close-triggered job that exposes secrets for any PR.

Similar things to look for elsewhere

  • pull_request_target with a fork-controlled checkout. Look for workflows using pull_request_target whose checkout uses github.event.pull_request.head.repo.full_name or similar head-repository expressions for the base side. A positive result is a run where the checked-out "base" content comes from the fork.
  • Build or script execution after a privileged checkout. Look for npm ci, npm install, node, make or similar steps running after a pull_request_target checkout of fork code. A positive result is attacker-controlled code executing in a job that has secrets available to later steps.
  • Secrets available to later steps. Trace which secrets are referenced after the untrusted execution step. A positive result is a token such as a PAT being readable by code that ran from the fork.
  • Close-triggered jobs. Look for jobs triggered on PR close that reference secrets without restricting to trusted PRs. A positive result is a fork PR close that reaches a job holding tokens such as an access token or a read-only PAT.
  • Floating branch dependencies. Check whether a downstream repository consumes the configuration through a floating branch with no tag or SHA pin. A positive result is a dependency that would pick up a merged change on the next build without any pinning step.

Glossary

  • Repository: a folder of code stored online with its full change history.
  • Fork: a personal copy of someone else's repository, made inside your own account.
  • Pull request (PR): a request to merge your changes into another repository.
  • Base: the repository or branch that receives a pull request.
  • Head: the repository or branch that a pull request comes from, often a fork.
  • GitHub Actions: GitHub's built-in automation service that runs workflow files.
  • Workflow: a YAML recipe that says which commands to run when a given event happens.
  • Runner: the temporary computer GitHub provides to execute a workflow job.
  • Job: one unit of work inside a workflow, made of steps.
  • Step: a single command or action inside a job.
  • Secret: a password-like value stored in repository settings and handed to workflows at run time.
  • Token / PAT (Personal Access Token): a long random string that acts as a key to an account or service, without needing the password.
  • pull_request trigger: a workflow event that runs on a contributor's code in a restricted context without secrets.
  • pull_request_target trigger: a workflow event that runs in the privileged context of the base repository, with secrets available.
  • Checkout: the step that downloads a repository's code onto the runner.
  • npm ci: the Node.js package manager command that installs exactly the dependencies listed in a lockfile.
  • Lockfile: a file listing exact dependency versions so installs are reproducible.
  • node index.js: the command that runs the JavaScript file index.js with Node.js.
  • RCE (remote code execution): an attacker getting their own code to run on someone else's machine.
  • Exfiltration: sending stolen data out to a server the attacker controls.
  • Supply chain: the chain of dependencies a product is built from; a weakness in one link affects everything built from it.
  • Floating dependency: a dependency that always takes the latest version of a branch, with no tag or SHA pin, so new changes are picked up automatically.
  • Tag / SHA pin: fixing a dependency to one exact version or commit so it cannot change underneath you.
  • Scope (of a token): the set of permissions a token carries, such as reading or writing repositories.
  • Diff-based validation: checking a proposed change by comparing it against the base, which only works if the base is genuine.
  • Fingerprint protection: a browser feature that stops sites from identifying a user by the unique traits of their device.
  • Tracker blocking: a browser feature that stops third-party tracking scripts from loading.
  • CVSS: a standard scoring system for the severity of a vulnerability; the report gives no score.
  • HackerOne: a platform where security researchers report vulnerabilities to organisations.

More by 6r1ff1n

View all

1 more disclosed report, best first.

More from DuckDuckGo

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.