Malicious code in date-fmt-helper-xz (npm)
The npm package date-fmt-helper-xz contained malicious code in a postinstall.js script that established a reverse shell to a remote attacker-controlled host (8.135.48.40:4444) upon installation. The package was identified and reported by OpenSSF's malicious-packages project.
- Disclosed
- Last updated
- Blast radius
- All npm users who installed date-fmt-helper-xz during the malicious distribution window.
- Ecosystems
- Attack vectors
- Affected entities
- date-fmt-helper-xznpm package containing malicious postinstall.js
The npm package date-fmt-helper-xz was distributed with malicious code embedded in a postinstall.js script that executes automatically during npm install. The script establishes a reverse shell connection to a hardcoded remote host at 8.135.48.40 on port 4444, granting the attacker interactive shell access to the installer's machine.\n\nThe malicious script uses multiple fallback mechanisms to maximize success across different environments, including direct TCP connections via /bin/tcp, bash /dev/tcp, and python3 pty.spawn. If all shell attempts fail, the script sends HTTP GET requests to the same attacker host (http://8.135.48.40/shell/failed and /shell/error) to report the failure and error details.\n\nThe package advertises legitimate date formatting functionality, but the reverse shell capability is entirely unrelated to any stated purpose. This represents a classic supply chain attack where a malicious package is published to a public registry to compromise installer systems.\n\nThe incident was identified and credited to the OpenSSF's malicious-packages project (GitHub advisory GHSA-3553-96xv-fjg2).
Indicators of compromise
- Packages
- date-fmt-helper-xz
- IPs
- 8.135.48.40
- Hashes
- b384650ec0fabdd01a7dfc513cccd25156611a04c17ba0c435b950ddb9215777
Remediation
- Immediately uninstall date-fmt-helper-xz from all systems where it was installed
- Audit npm install logs to identify when the package was installed and on which machines
- Assume any machine that installed this package during the malicious distribution window has been compromised; perform forensic analysis and credential rotation
- Check for unauthorized network connections to 8.135.48.40 on port 4444 in network logs
- Review system logs for suspicious shell activity during and after the installation period
- Update npm to the latest version and audit all installed dependencies for similar malicious patterns
- Consider using npm audit and supply chain security tools to detect malicious packages before installation
Sources
- GitHub Advisory GHSA-3553-96xv-fjg2 · GitHub Advisory Database
Cite this entry
"Malicious code in date-fmt-helper-xz (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 13, 2026; last updated August 13, 2026. https://supplychainattack.org/incident/malicious-code-in-date-fmt-helper-xz-npm-1eoevm
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 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 - 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