Join our Newsletter — 33% off our NHI Course
Threats, Abuse & Incident Response

Nx s1ngularity

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Threats, Abuse & Incident Response

Nx s1ngularity was a 2025 supply chain attack in which malicious Nx npm package versions ran an install script that used locally installed AI command-line tools to hunt for secrets, then published stolen tokens and keys to public GitHub repositories. Affected teams should rotate exposed credentials and check GitHub accounts for unexpected repositories.

What Nx s1ngularity Shows About Supply Chain Compromise

Nx s1ngularity is a supply chain compromise pattern, not just a package malware event. A malicious package update can turn the normal install step into an execution point, which means the attack starts before defenders often expect to see suspicious behaviour.

The key security lesson is that software delivery trust can be abused at the package, build, and developer workstation layers at the same time. When a poisoned dependency runs locally, the blast radius depends on what secrets are reachable on the host, in the shell environment, and in any connected developer tooling.

This is why open source package compromise is dangerous even when the initial code change looks small. One malicious install script can reach tokens, SSH keys, API credentials, and cloud sessions that were never meant to be exposed to the package lifecycle.

How the Attack Extracted Secrets and Exposed Accounts

The attack path combined multiple trusted surfaces. The malicious package used an install script to enumerate local secrets, then leveraged locally installed AI command-line tools to help search for sensitive material, and finally published stolen values to public GitHub repositories.

That sequence matters because it shows how dependency compromise can become credential compromise very quickly. Once tokens or keys are recovered, the attacker may gain access to source control, package publishing, cloud services, or internal systems that trust those credentials.

The GitHub repository step also changes the impact profile. Exposed tokens are not just stolen data, they can become durable access paths if they are reused elsewhere, left active, or not monitored for misuse after publication.

Exposure Checks and Immediate Containment

Organisations should first identify where the affected package was installed, which build hosts or developer machines ran it, and whether those systems had access to high-value secrets. Repository history, CI logs, and environment variable injection paths are all relevant places to inspect.

Containment should focus on stopping further credential use and limiting the attacker’s ability to pivot. npm token security guidance is relevant here because package publishing tokens and trusted publishing paths are part of the same trust chain that an incident like this can abuse.

After exposure is confirmed, teams should rotate any credential that may have been present on the affected host, then review GitHub for unexpected repositories, workflow changes, and unusual publishing or access activity. The same rule applies to downstream systems that accepted the exposed secret as proof of trust.

Detection, Review, and Hardening After the Incident

Detection should look for signs that a package install triggered unexpected network activity, repository creation, token use, or secret enumeration. Post-incident review should compare package lockfiles, dependency provenance, and installed scripts against the expected software supply chain.

For longer-term hardening, treat install-time code execution as a high-risk trust boundary and reduce what secrets are present on developer and CI hosts. The response model in open source package compromise response aligns with that approach by centring exposure confirmation, credential revocation, and build hardening.

It is also worth reviewing whether local AI tools were permitted unnecessary access to repositories, shells, or environment variables. AI agent breaches is useful background when a trusted local tool becomes part of the compromise chain, because the control problem is often overbroad access rather than model behaviour alone.

Risk and Threat Considerations

Poisoned packages create a high-impact compromise path because the attacker inherits whatever the installation environment can see. In this case, the danger is not limited to source code tampering, it extends to secrets, publishing credentials, and any GitHub trust relationships that those credentials unlock.

Failure mechanism: A malicious dependency executes during install, collects locally available secrets, and exfiltrates them through a workflow the victim already trusts, which can turn routine developer activity into account compromise.

Impact: Stolen tokens and keys can enable repository access, package publication abuse, cloud access, or further supply chain compromise, and public disclosure can leave organisations dealing with both containment and downstream trust revocation.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while SLSA and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
SLSASupply Chain Levels for Software ArtifactsNx package compromise hinges on build and dependency provenance.
Recommendation — Verify artifact provenance and reduce trust in unreviewed install-time execution.
CIS Controls v8CIS-16 — Application Software SecurityThe term centers on malicious package execution in the software supply chain.
Recommendation — Control software acquisition and installation paths to reduce malicious dependency execution.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageThe attack exfiltrates tokens and keys from exposed developer environments.
NHI-07 — Long-Lived SecretsStolen tokens remain dangerous when secrets outlive the incident response window.
Recommendation — Limit secret exposure on hosts and rotate leaked credentials immediately after compromise. Shorten secret lifetimes and revoke exposed credentials quickly after compromise.
MITRE ATT&CKT1552 — Unsecured CredentialsThe attack steals locally stored secrets during execution.
Recommendation — Hunt for exposed credentials on affected hosts and treat them as compromised.

Practitioner Guidance

Why practitioners should care: Treat any package that runs install-time code as a potential credential collection point, especially on developer laptops and CI runners that already hold secrets. The practical question is not only whether the package is malicious, but which trust boundaries it can reach before detection.

Common misunderstanding: Teams sometimes assume a package compromise is contained to the dependency ecosystem. In reality, once secrets are present on the host, the incident becomes an identity and access problem as well as a software supply chain problem.

Practitioner takeaway: Rotation, repository review, and build-host hardening should happen together, because any one of them alone leaves part of the compromise path intact.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org