Malicious code in postcss-theme-provider (npm)
postcss-theme-provider npm package contained malicious code that executed on require, using an Ethereum-hosted dead-drop pattern to fetch and execute arbitrary JavaScript from attacker-controlled C2 servers.
- Disclosed
- Last updated
- Blast radius
- Any project that installed postcss-theme-provider during the malicious window; runtime code execution on require.
- Ecosystems
- Attack vectors
- Affected entities
- postcss-theme-providernpm package containing malicious code in compiled dist/index.cjs
The postcss-theme-provider npm package contained obfuscated malicious code in its compiled distribution files (dist/index.cjs, referenced by the main entry point). The code executed automatically as a top-level async IIFE when the package was imported.\n\nThe malicious loader queried public Ethereum RPC endpoints to retrieve the latest transaction from a hardcoded attacker wallet (0xa322E5f3D311D3080e6f01210063e9aDC2490Ef1a). It decoded two IPv4 addresses from the transaction's to field bytes, then fetched XOR-encrypted JavaScript payloads from attacker-controlled HTTP servers at those addresses. The payloads were decrypted and executed via eval(), with a detached child process spawned via child_process.spawn with unref().\n\nThe attack used unicode escape sequences (\u00XX) to obfuscate module names, endpoints, method names, and the wallet address, while legitimate PostCSS code in the same file used normal string literals. This Ethereum-hosted dead-drop pattern (EtherHiding) allowed the operator to rotate the payload host by posting new transactions from the wallet, enabling dynamic C2 updates without redeploying the package.\n\nThe incident was identified and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- postcss-theme-provider
- Domains
- eth-mainnet.public.blastapi.io
- eth.blockscout.com
- Hashes
- d8d6afcada49b5397e1b4d6a41d4ec0b31903593e65219c919e0d310d3941a40
Remediation
- Remove postcss-theme-provider from all projects immediately
- Audit package-lock.json and yarn.lock for the presence of postcss-theme-provider and determine installation dates
- Review process logs and network traffic from affected systems during the malicious package's presence for signs of payload execution
- Rotate any credentials or secrets that may have been exposed on systems where the package was installed
- Update to a patched version of postcss-theme-provider if one is released, or use an alternative PostCSS theme provider
- Implement package pinning and integrity verification (e.g., npm audit, lock files) to prevent similar supply chain attacks
Sources
- GitHub Advisory GHSA-43g9-xh9q-657c · GitHub Advisory Database
Cite this entry
"Malicious code in postcss-theme-provider (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 7, 2026; last updated August 7, 2026. https://supplychainattack.org/incident/malicious-code-in-postcss-theme-provider-npm-vxl1gb
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 epic-common (npm)
The npm package epic-common was found to contain malicious code. The package was identified by Amazon Inspector and reported through the OpenSSF malicious packages database.
npmCompromised package - containedcritical
Malicious code in pfp-forms-sme-loan (npm)
The npm package pfp-forms-sme-loan contains malicious code that executes a hidden loader on import, downloading and running platform-specific native payloads from attacker-controlled Cloudflare Workers hosts or reconstructing them via DNS TXT records under well1.site. Any system that imported this package should be considered compromised.
npmCompromised packageMalicious commit - resolvedcritical
Malicious code in epic-sso (npm)
The npm package epic-sso was found to contain malicious code. The package was identified by Amazon Inspector and reported through the OpenSSF malicious packages database.
npmCompromised package - containedcritical
Malicious code in checkout-desktop-total (npm)
The npm package checkout-desktop-total contained malicious code that executes a hidden loader on import, downloading and running platform-specific native payloads from attacker-controlled Cloudflare Workers hosts or reconstructing them via DNS TXT records under wel1.ru. Any system that imported this package should be considered compromised.
npmCompromised package