ghtier

These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.

← All incidents

"Pwn requests": pull_request_target & workflow_run

Ongoing · Ongoing

A workflow on pull_request_target or workflow_run runs in the base repository with its secrets and a write token, so when it also checks out and runs the pull request's code, or takes in its artifacts or title, anyone who can open a pull request runs code with those privileges.

Access held
T2Contents: WriteRepository secrets
Full summary

GitHub's ordinary pull_request trigger gives a fork's pull request no secrets and a read-only token. pull_request_target was added for workflows that need more, such as labelling or commenting, and runs in the base repository with its secrets and a token that can write. Its safety assumes the workflow only runs the repository's own code and treats the pull request as data. GitHub Security Lab described the failure in December 2020 and called it a pwn request: a workflow that checks out the pull request's head and builds or tests it, so the attacker's code runs with the secrets. Legit Security showed the same with workflow_run, where a privileged workflow trusts artifacts or data from the unprivileged run a pull request started. The pattern is behind several incidents on this site: Nx s1ngularity, Ultralytics, the spotbugs step of tj-actions, hackerbot-claw, prt-scan and the TanStack cache poisoning. Datadog found that 38% of organizations had a workflow open to script injection or a dangerous trigger. In November 2025 GitHub changed pull_request_target to always take the workflow from the default branch, so a fix on main also covers old branches.

How it unfolded

Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.

Whole path

Untrusted input reaches aprivileged workflowway inRun PR code in a privilegedworkflowtechniqueContents: WriteThe run's workflow tokenRepository secretsThe base repository

The whole attack, one row per step. Pick a step on the left, or click a box in its row.

Frameworks

Part of

Ongoing. First seen April 2021. Mapping by ghtier, not yet reviewed. Threat landscape

Sources

Reported by: Datadog