Malicious code in ngsw-config (npm)
A malicious npm package named ngsw-config was published to shadow Angular's legitimate tooling. The package's postinstall script collected and exfiltrated host identifiers (hostname, platform, architecture, Node version, package/lifecycle name, timestamp) to a hardcoded endpoint without consent or documentation, targeting dependency-confusion scenarios in internal build systems.
- Disclosed
- Last updated
- Blast radius
- Any npm user or build system that installed the malicious ngsw-config package; particularly internal build systems configured to resolve dependencies from public npm registry.
- Ecosystems
- Attack vectors
- Affected entities
- ngsw-configMalicious package on npm shadowing Angular's legitimate ngsw-config tooling
A malicious npm package named ngsw-config was discovered and reported by the OpenSSF. The package name was chosen to shadow Angular's legitimate ngsw-config tooling, matching a dependency-confusion canary pattern designed to detect and exploit internal build systems that misresolve package names.
Upon installation, the package's postinstall lifecycle script automatically executed and collected identifying metadata from the installer's host, including hostname, platform, architecture, Node version, package/lifecycle name, and timestamp. This data was then POSTed as JSON to a hardcoded endpoint at https://wxc97jnc.instances.poc.jchunt.top/ngsw-config without any user consent, documentation, or opt-out mechanism.
The attack was designed to identify and profile internal build systems that incorrectly resolved the package name from the public npm registry instead of an internal registry, allowing the attacker to map and track affected organizations' infrastructure.
The incident was identified and credited to the OpenSSF's malicious-packages repository (MAL-2026-14251).
Indicators of compromise
- Packages
- ngsw-config
- Domains
- wxc97jnc.instances.poc.jchunt.top
Remediation
- Immediately uninstall the malicious ngsw-config package from all systems and build environments
- Audit npm install logs and package-lock.json files to identify if the malicious package was installed
- Review host identifiers and metadata that may have been exfiltrated (hostname, platform, architecture, Node version)
- Implement strict dependency resolution policies to prevent dependency-confusion attacks, such as using npm scopes or private registries for internal packages
- Configure npm to only resolve packages from trusted registries
- Monitor for any suspicious outbound connections to the identified endpoint
- Update to use only the legitimate Angular ngsw-config package from @angular scope
Sources
- GitHub Advisory GHSA-87qj-53cx-w424 · GitHub Advisory Database
Cite this entry
"Malicious code in ngsw-config (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-ngsw-config-npm-1tdj0f
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in bazelisk (npm)
A malicious npm package named bazelisk, impersonating Google's legitimate bazelbuild/bazelisk project, was published with a postinstall script that exfiltrates system and environment information to an attacker-controlled server. The package exhibits dependency-confusion and typosquatting characteristics, collecting hostname, platform, architecture, Node version, and npm lifecycle event data.
npmCompromised packageDependency confusionTyposquatting - resolvedcritical
Malicious code in localize-extract (npm)
localize-extract@1.0.0 on npm contained malicious postinstall code that exfiltrated host identifiers to an attacker-controlled endpoint. The package name resembled @angular/localize, suggesting a dependency-confusion or typosquatting attack.
npmCompromised packageTyposquattingDependency confusion - resolvedcritical
Malicious code in gaarf-node-bq (npm)
gaarf-node-bq is a malicious npm package that acts as a dependency-confusion/typosquat canary targeting Google's internal gaarf package. The package's postinstall script collects host metadata and exfiltrates it to an external endpoint without user consent.
npmDependency confusionTyposquattingCompromised package - resolvedcritical
Malicious code in depcruise-wrap-stream-in-html (npm)
depcruise-wrap-stream-in-html@99.9.1 is a malicious npm package that mimics an internal helper of dependency-cruiser. It is a hollow package that downloads and executes arbitrary code from a Google Cloud Storage bucket during installation.
npmCompromised packageDependency confusionTyposquatting