GHSL-2025-111: Potential Privilege Escalation or Code Execution in nrwl/nx
Two branches of the nrwl/nx repository still contain a workflow that uses pull_request_target without branch filters, allowing an attacker to trigger privileged code execution. This could lead to privilege escalation or code execution, though the impact is limited because 2FA is required to publish NPM packages.
The nrwl/nx project contains a vulnerability due to the use of the pullrequesttarget workflow in two branches, which could expose the repository to potential privilege escalation or unauthorized code execution risks. This issue is documented as GHSL-2025-111.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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 uses pull_request_target without branch filters, so it runs from the target branch of a pull request, and two branches still contain the vulnerable version.
What the attacker needed
Access to create a pull request; target branch contains vulnerable workflow
The fix
The vulnerable workflow should be removed or updated in the two remaining branches, as was done in the default branch.
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.
A GitHub Actions workflow is an automated script that runs when something happens, like a pull request. The pull_request_target trigger runs the workflow with extra permissions, and if it is not restricted to specific branches, an attacker can make it run their own code. Here, two older branches still had this unsafe setup, so an attacker could potentially run code with elevated privileges.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.