On 26 August 2025, attackers published malicious versions of Nx, a popular build tool for JavaScript projects. The bad releases, including 21.5.0 and 20.9.0, collected passwords, keys and .env files from developer machines and posted them to public repositories. The issue is tracked as advisory GHSA-cxm3-wv7p-598c.
What is going on
The attacker abused a GitHub Actions workflow that used pull_request_target. That setting lets a workflow run with the project's own secrets, even when the code comes from an outside contributor. Through it, the attacker reached the project's npm token, the key that lets someone publish new versions of a package.
Think of it as a delivery firm letting a stranger into the key cupboard. With the key, the attacker shipped parcels that looked genuine.
The poisoned packages ran a postinstall script, code that runs automatically during installation. It harvested credentials and .env files, uploaded them to public repositories named s1ngularity-repository, and appended a sudo shutdown line to shell profiles so the machine would switch off.
Who is affected
This affects JavaScript monorepos that use Nx and installed an affected version on 26 or 27 August 2025. Known bad releases include 21.5.0 and 20.9.0.
If your website was built by an agency or freelancer with an Nx-based project, ask them whether they installed Nx on those dates. The risk sits mainly on developer laptops and build servers, not on the finished website itself. Still, stolen tokens can later be used to change code or hosting.
What to do now
- Update Nx to a clean version and remove the affected releases from any machine that installed them.
- Rotate your GitHub, npm and API tokens. Treat anything stored on an affected machine as exposed.
- Open your shell profile files and delete the added
sudo shutdownline. - Review GitHub Actions workflows that use
pull_request_targetand limit what they can access. - Check your accounts for unexpected publishes, new repositories or unfamiliar logins.
How to check your own site
A stolen token is often used to push changes to a live site. The free Website Security Check looks at your public site for outdated CMS versions, known-vulnerable plugins, missing security headers, weak TLS and email-authentication gaps, so you can spot changes you did not expect. If you own the site and have verified it, you can also run a full scan, which adds active OWASP Top 10 testing, port and service checks with CVE matching, and exposed-file and secret checks.
Source: GHSA-cxm3-wv7p-598c, August 2025.
Comments
No comments yet.