CVE-2026-129840: GitHub Actions pull_request_target code injection in nrfconnect/ncs-zigbee (build_documentation.yml)
In the nrfconnect/ncs-zigbee repository, the GitHub Actions workflow .github/workflows/builddocumentation.yml used the pullrequesttarget trigger while checking out and executing untrusted pull request code. This allowed a pull request from a fork to run attacker-controlled code in the base repository context with a write-scoped GITHUBTOKEN (contents: write, pages: write, pull-requests: write), enabling remote code execution in CI, token exfiltration, and unauthorized modification of repository content and GitHub Pages. The workflow was disabled and then rewritten to remove the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Disable the workflow to prevent it from running pull request code in the base repository.
.github/workflows/build_documentation.yml workflow enabled = false
Event History
Frequently Asked Questions
Who could exploit the affected workflow?
An attacker able to open a pull request from a fork could exploit it. No prior repository permissions or user interaction were required.
What access could attacker-controlled workflow code obtain?
The code ran in the base repository context with a write-scoped GITHUB_TOKEN granting contents: write, pages: write, and pull-requests: write. This could enable token exfiltration and unauthorized changes to repository content or GitHub Pages.
What should maintainers do if they cannot immediately apply the rewritten workflow?
Disable the affected build_documentation.yml workflow. The described exposure depends on the pull_request_target workflow checking out and executing untrusted pull-request code.
How can maintainers determine whether they were exposed?
Review whether build_documentation.yml used pull_request_target and checked out or executed code supplied by forked pull requests. Also review workflow runs and repository or GitHub Pages changes for activity performed through the write-scoped GITHUB_TOKEN.