Malicious code in datefmt-simple-utils (npm)
datefmt-simple-utils, an npm package masquerading as a date-formatting utility, contained malicious code in its postinstall script that established reverse shell connections to a remote host (8.135.48.40:4444) upon installation, granting full command execution to the attacker.
- Disclosed
- Last updated
- Blast radius
- All npm users who installed datefmt-simple-utils
- Ecosystems
- Attack vectors
- Affected entities
- datefmt-simple-utilsnpm package containing malicious postinstall script
datefmt-simple-utils was published to npm as a date-formatting utility but contained no legitimate functionality. Instead, the package.json declared a postinstall script that automatically executed on npm install.
The postinstall.js script established a TCP socket connection to the hardcoded remote host 8.135.48.40 on port 4444 and attached an interactive /bin/bash shell to that socket, providing the remote endpoint with full command execution capabilities on the installer's machine.
The package included three fallback reverse shell techniques to ensure persistence: a python3 pty.spawn reverse shell, a python3 subprocess-based variant, and a Node.js net.connect + spawn('/bin/bash', ['-i']) variant, all targeting the same remote host.
The incident was identified and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- datefmt-simple-utils
- IPs
- 8.135.48.40
Remediation
- Immediately uninstall datefmt-simple-utils from all systems
- Audit npm install logs to identify when the package was installed
- Assume any machine that installed this package has been compromised; perform full security audit and credential rotation
- Review network logs for outbound connections to 8.135.48.40:4444
- Update npm to the latest version and audit all installed packages for similar malicious patterns
- Consider using npm audit and supply chain security tools to detect similar threats
Sources
- GitHub Advisory GHSA-8hx5-vj8g-mqv7 · GitHub Advisory Database
Cite this entry
"Malicious code in datefmt-simple-utils (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 14, 2026; last updated August 14, 2026. https://supplychainattack.org/incident/malicious-code-in-datefmt-simple-utils-npm-1tjznu
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in rust-testing-utils (npm)
The npm package rust-testing-utils contained malicious code that impersonates the pino logger and executes remotely-fetched code with arbitrary privileges. The package spawns a child process that decodes a hardcoded URL, fetches attacker-controlled content, and executes it via Function constructor with full module-loading capability.
npmCompromised packageMalicious commit - containedcritical
Malicious code in stillm4ddpocs-demo-sprocket (npm)
The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.
npmCompromised packageDependency confusion - containedcritical
Malicious code in @syncraft-labs/react (npm)
The npm package @syncraft-labs/react contained obfuscated malicious code in its ESM distribution that implements the EtherHiding pattern, fetching and executing arbitrary code from an Ethereum smart contract via RPC endpoints. The tampering occurred post-build in the dist/index.js artifact.
npmCompromised package - containedcritical
Malware in hydration-dim-kit
Malware was discovered in the npm package hydration-dim-kit. Any computer with this package installed or running should be considered fully compromised. All secrets and keys must be rotated immediately from a different computer.
npmCompromised package