TL;DR: A phishing-led NPM supply-chain attack compromised high-download JavaScript packages such as chalk, debug and ansi-styles, with the malware capable of altering browser activity and potentially affecting mobile apps built on shared web components, according to NowSecure. The incident shows how dependency trust, not just endpoint hardening, becomes the critical control point when popular libraries are subverted.
NHIMG editorial — based on content published by NowSecure: NPM supply-chain attack affecting popular JavaScript packages and mobile apps
By the numbers:
- The compromised packages include chalk, debug and ansi-styles, with weekly downloads of 299.99m, 357.6m and 371.41m respectively.
- NowSecure identified approximately 190 mobile apps across iOS and Android that include at least one of the 18 affected components in their dependency chain.
Questions worth separating out
Q: How should security teams respond when a trusted JavaScript package is compromised?
A: Treat the event as both a supply-chain incident and a secrets exposure risk.
Q: Why do JavaScript supply-chain attacks create identity risk?
A: Because the most valuable targets are often non-human identities in the form of API keys, service tokens and session credentials.
Q: What do teams get wrong about mobile app supply-chain security?
A: Many teams assume mobile apps are insulated from upstream JavaScript compromise because they are packaged and reviewed separately.
Practitioner guidance
- Audit all transitive JavaScript dependencies Identify every affected package name and version across mobile, web and backend builds, including indirect dependencies and bundled assets.
- Pin and replace compromised versions immediately Lock builds to known-good releases from before the compromise window and move to fixed versions only after validating package integrity from official npm sources.
- Scan runtime behaviour for tampering signals Instrument applications to detect unexpected fetch interception, XMLHttpRequest manipulation, wallet API modification and other anomalous request rewriting in production.
What's in the full analysis
NowSecure's full article covers the operational detail this post intentionally leaves for the source:
- Exact affected package versions and the technical indicators security teams can use to verify exposure
- The preliminary list of potentially impacted iOS and Android apps, including component counts by application
- Mobile-specific remediation guidance for hybrid apps, WebViews and app store release delays
- NowSecure Platform analysis details, including binary inspection and dependency identification methods
👉 Read NowSecure's analysis of the NPM supply-chain attack and mobile app exposure →
NPM supply chain compromise in mobile apps: what teams need to know?
Explore further
JavaScript package compromise is now an identity problem as much as a code problem. When malicious code is inserted into a widely trusted library, the immediate targets are often secrets, tokens and session material rather than source code itself. That shifts supply-chain governance into the IAM and NHI domain because the exposed assets are non-human identities and delegated credentials. Practitioners should treat upstream dependency trust as part of identity governance, not only software composition management.
A few things that frame the scale:
- The attack affected packages with a combined 2+ billion weekly downloads, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
A question worth separating out:
Q: What should organisations do first if users may already be affected?
A: Contain the affected applications, rotate exposed credentials, and check for transaction tampering or unusual API activity before allowing clean versions back into circulation. For mobile apps, also factor in app store review delays and user update lag, because vulnerable versions can remain active after a fix exists.
👉 Read our full editorial: NPM supply chain compromise exposes mobile apps to JavaScript risk