
Github.com
A security enforcement that GitHub has spent five years documenting but only recently committed to shipping went live this morning. Starting today, the actions/checkout action — the most widely used building block in GitHub Actions workflows — refuses by default to execute untrusted code from fork pull requests inside privileged event contexts. The change applies automatically to every workflow pinned to a floating major tag across all supported checkout versions, closing one of the most persistently exploited CI/CD attack patterns without requiring developers to touch a line of YAML. What it does not close, and what every engineering team should audit today, is everything else.
The enforcement lands six days after the most recent canonical demonstration of the vulnerability it targets. On July 14, an attacker opened 37 pull requests against the AsyncAPI generator repository, camouflaging a single exploit pull request in the noise, as Chainguard's analysis documented. Within an hour, a misconfigured pull_request_target workflow had executed the attacker's code, exposed the project's npm publish token, and handed the attacker enough access to push malicious commits under a legitimate automated identity, according to Microsoft Threat Intelligence. Five backdoored package versions across four @asyncapi packages reached npm before researchers caught the attack — packages that together see more than 2.25 million weekly downloads, as Aikido researchers found. Had this morning's enforcement been in place on July 14, the exploit would have failed at the checkout step.
GitHub did not wait for that incident to ship the enforcement. The platform had already published actions/checkout v7 on June 18, 2026, with a firm policy: refuse, by default, to fetch fork pull request code inside pull_request_target and workflow_run workflows, per the GitHub Changelog. The backport that activates today extends the same protection to every currently supported major version — v2 through v6 — for the large share of production workflows that never pin to an explicit release. Version 1 is outside GitHub's support window and will not receive the update.
Read more: GitHub Actions Supply Chain Flaw Exposes Microsoft and Google to Free-Account Hijack
The pull_request_target event was introduced by GitHub in 2020 to fill a legitimate gap. The standard pull_request event runs in the context of a fork — with no access to the base repository's secrets, tokens, or cache — which makes it useless for automation that requires elevated permissions. Comment posting, label assignment, authenticated status checks: these are all tasks a maintainer might want to automate on PRs from external contributors, and they require base-repository privileges. pull_request_target was the solution: it runs in the base repository's context, with access to GITHUB_TOKEN, encrypted secrets, and the default-branch cache.
The problem is that developers began reaching for pull_request_target in cases where they also needed to run untrusted code — running the test suite against a contributor's changes, generating coverage reports, executing authenticated integration checks against the actual diff. The event was not designed for that use case. When a workflow triggered by pull_request_target checks out the head commit of a fork's pull request — code the maintainer has not yet reviewed — and then executes it with base-repository privileges, any attacker who can open a pull request can run arbitrary code with the target repository's full credential set. GitHub Security Lab named this pattern a "pwn request" in 2021 and documented it publicly.
The documentation did not stop the attacks. Orca Security researchers, working from a dataset of 5,000 repositories that used pull_request_target, found that roughly 50 were demonstrably exploitable — including workflows in repositories maintained by Microsoft, Google, and other Fortune 500 companies, as Orca's October 2025 research showed. The firm demonstrated lateral movement to cloud vendors and owner-level access to Google Cloud projects from a single free GitHub account. The vulnerability is not a matter of obscure configuration; it is a structural pattern that repeats because the pull_request_target event looks, on first reading, like the obvious solution to a real workflow problem.
The checkout action now fails, by default, when three specific conditions combine: the pull request originates from a fork, the workflow trigger is pull_request_target or workflow_run (where the triggering event was a pull request), and the checkout step attempts to fetch the fork's code in any of three forms, per the GitHub Changelog.
Those three forms cover the most common vulnerable patterns. A checkout step that sets repository: to the fork's repository name fails. A step that sets ref: to refs/pull/N/head or refs/pull/N/merge fails. A step that sets ref: to the fork pull request's head or merge commit SHA also fails. These are the exact inputs that would hand attacker-controlled code the base repository's credentials.
Workflows that rely on a floating major tag — actions/checkout@v4, @v5, @v6 — pick up the protection automatically the next time they run. No code change, no deployment action, no configuration update required. Pipelines that currently check out fork pull request code in pull_request_target contexts will begin failing immediately, which is the intended behavior: the failure surfaces a previously silent vulnerability.
Workflows pinned to a specific SHA, minor version, or patch version are not affected by today's backport. Those teams must upgrade manually — Dependabot is the recommended path — before they inherit the protection.
The enforcement that activates today addresses the same attack class responsible for some of the most significant CI/CD compromises since 2025. Understanding the scope clarifies what today's change protects and what it does not.
In March 2025, security researchers discovered that tj-actions/changed-files — a GitHub Action used in more than 23,000 repositories — had been poisoned with a malicious payload that wrote CI/CD secrets to publicly readable workflow logs, as detailed in the GitHub Advisory Database. The U.S. Cybersecurity and Infrastructure Security Agency added the associated vulnerability (CVE-2025-30066) to its Known Exploited Vulnerabilities catalog, per the CISA alert. The full attack chain began months earlier with a pull_request_target exploit against the unrelated spotbugs repository in late 2024, which yielded a personal access token that cascaded through reviewdog/action-setup and ultimately gave the attacker write access to the tj-actions infrastructure, as both Infosecurity Magazine and Unit42 researchers documented. The original target, confirmed by Unit42 researchers in March 2025, was Coinbase.
Between April and May 2026, the threat group tracked as TeamPCP launched a coordinated campaign, now called Mini Shai-Hulud, that compromised more than 172 npm and PyPI packages across more than 400 malicious versions, per Tenable's FAQ. The campaign exploited GitHub Actions workflows — including cache poisoning and OIDC token hijacking — to gain publisher access to packages used by TanStack, Mistral AI, UiPath, and OpenSearch. Cumulative download exposure across the full Shai-Hulud campaign family reached an estimated 518 million weekly downloads, according to FalconFeeds' analysis.
The July 14 AsyncAPI attack was the most direct use of the specific vulnerability today's enforcement addresses. Microsoft Threat Intelligence confirmed the origin as a pull_request_target pwn request. A researcher named Florence Njeri had identified the exploitable workflow in the AsyncAPI repository and submitted a proof-of-concept fix in May 2026; the fix sat unmerged for nearly two months before the attack materialized, as Aikido's analysis reported.
Read more: npm v12 Ships This Month, Blocking Install Scripts That Enabled Year of Supply Chain Attacks
GitHub's community discussions around the June 18 release frame today's backport as the opening move in a "secure by default" roadmap for GitHub Actions — an explicit acknowledgment that the prior approach, which relied on developers reading and applying security guidance, did not contain the attack class, per the GitHub Changelog.
This shift matters beyond the specific vulnerability. The pull_request_target documentation had clearly identified the pwn-request risk since 2021. CISA had added multiple resulting CVEs to its Known Exploited Vulnerabilities catalog. Security researchers had demonstrated exploitable workflows across Fortune 500 company repositories. The attack pattern was not obscure; it was documented, warned about, and repeatedly exploited anyway — because understanding a risk and structuring a platform to prevent it by default are different kinds of interventions.
GitHub's March 2026 security roadmap for Actions acknowledged the failure directly, citing failures in "dependency management, complex and implicit trust boundaries, secret handling, and observability" as contributing to the increase in supply chain attacks, as covered in TechTimes' earlier reporting. The roadmap commits to additional protections — deterministic dependency locking, network egress firewalls for runners, scoped secrets — most of which remain in preview as of today.
GitLab and CircleCI both isolated fork builds from secrets by default in their early architectures. GitHub, which built pull_request_target in 2020 to solve a legitimate workflow problem, has taken five additional years to enforce what competing platforms shipped as a baseline, as Socket.dev observed.
Some legitimate workflows genuinely need to execute fork pull request code with elevated trust — coverage reports requiring access to private artifact registries, authenticated integration checks against the actual diff. GitHub has preserved an opt-out, but has deliberately named it to resist casual use.
A workflow can re-enable the blocked behavior by setting allow-unsafe-pr-checkout: true as an input on the actions/checkout step. The flag name is intentional: it is designed to stand out in code review and be detectable by static analysis. Any security policy that treats occurrences of this flag as requiring explicit documented justification and sign-off before merge gains a durable, searchable audit trail for privileged fork checkout decisions, per the GitHub Changelog. Before opting out, GitHub's guidance recommends a full review of its secure-usage documentation for pull_request_target.
GitHub's changelog is specific about the boundaries of today's change, and those boundaries matter for any team conducting a security audit, per the GitHub Changelog.
The protection only applies to checkouts performed through actions/checkout. A workflow that uses a run: block to invoke git or the GitHub CLI (gh) to pull an untrusted HEAD ref is entirely outside today's enforcement. The same attack can be mounted through those paths. Other event triggers — issue_comment is the most commonly cited example — can be misused in analogous ways and are not addressed here. Checking out an unrelated third-party repository is also not blocked; the enforcement is scoped to fork pull request head and merge commits only.
Orca Security's October 2025 research noted that even at the 1% exploitability rate found in their 5,000-repository sample, there are more than 100,000 code-level findings in the wild that use pull_request_target in some form, as Orca's report documented. Today's enforcement removes the easiest and most common exploitation path; it does not eliminate the attack surface.
The fastest audit path for any team with workflows using pull_request_target or workflow_run is to search workflow YAML files for three combinations: the trigger keyword alongside any of github.event.pull_request.head.sha, github.event.pull_request.head.repo.full_name, or the string refs/pull/. Any workflow file where those combinations appear together warrants immediate review.
Teams on floating major tags — the most common configuration — will see those workflows fail naturally when they next run. The failure message identifies the specific blocked checkout pattern. Teams on pinned SHA, minor, or patch versions should treat upgrading to a floating major tag or to actions/checkout@v7 explicitly as a priority security task, applying the same urgency as a critical dependency patch.
For any workflow where a fork checkout is genuinely necessary, the correct path is to add allow-unsafe-pr-checkout: true with written justification and to flag that line in the team's code review policy.
If your workflow uses pull_request_target or workflow_run, is pinned to a floating major tag (like @v4), and includes a checkout step that references fork pull request code — such as ref: ${{ github.event.pull_request.head.sha }} — then yes, that pipeline will begin failing today. The failure is intentional. It surfaces a checkout pattern that was silently granting attacker-controlled code access to your repository's secrets. Teams that need that behavior for legitimate reasons can restore it by adding allow-unsafe-pr-checkout: true to the checkout step, but GitHub recommends reviewing the secure-usage guidance before doing so.
pull_request_target more dangerous than the standard pull_request event?The standard pull_request event runs in the context of the fork — with no access to the base repository's secrets, encrypted tokens, or default-branch cache. pull_request_target runs in the base repository's context, with full access to all of those resources. That elevated context is why it exists: it enables automated commenting, labeling, and status checks that require repository permissions. The danger comes when developers add a checkout of the fork's unreviewed code to a pull_request_target workflow, because that code now executes with base-repository credentials in scope. The July 14 AsyncAPI attack demonstrated exactly this: an attacker opened a pull request, triggered the workflow, and exfiltrated an npm publish token before any reviewer saw the code.
No. Today's enforcement closes the most common vector for pwn request attacks through actions/checkout, but several attack surfaces remain unaddressed. Workflows that use run: blocks invoking git or the GitHub CLI to pull untrusted refs are still vulnerable. Other event types — including issue_comment — can be misused in similar ways and are outside today's change. The broader supply chain risk, including tag poisoning (which drove the tj-actions attack), OIDC token hijacking (which drove the TeamPCP campaign), and malicious package publication, is not addressed by this enforcement at all. Teams should treat today's change as one layer of defense, not a complete solution.
Pinned SHA, minor, and patch versions do not receive today's automatic backport. Those teams should upgrade to a floating major tag or to actions/checkout@v7 explicitly via Dependabot or their established dependency upgrade process, and treat this as a priority security task. The upgrade is the only way to inherit today's enforcement and any future Actions security improvements that ship through the supported major versions.
