Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in datetime-fmt-xutil (npm)

The npm package datetime-fmt-xutil contained malicious code in its postinstall.js script that established a reverse shell connection to a hardcoded IP address (8.135.48.40:4444) during installation, granting interactive shell access to an attacker. The package was identified and reported by OpenSSF.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
All npm users who installed datetime-fmt-xutil during the malicious period
Ecosystems
Attack vectors
Affected entities
  • datetime-fmt-xutilnpm package containing malicious postinstall.js

The npm package datetime-fmt-xutil was found to contain malicious code embedded in its postinstall.js script. When installed, the script unconditionally executes via npm's scripts.postinstall hook, opening a TCP connection to the hardcoded IP address 8.135.48.40 on port 4444 and piping /bin/sh stdio through the socket to grant interactive shell access to the attacker.\n\nThe malicious behavior includes multiple fallback mechanisms: if the initial TCP connection fails, the script attempts to execute bash and python3 reverse-shell one-liners. Failed connection attempts are beaconed back to the attacker via HTTP GET requests to http://8.135.48.40/shell/failed with error details.\n\nThe package's legitimate index.js date-formatting functionality served as a cover for the reverse-shell payload. The hardcoded IP address has no relation to any declared package publisher, indicating a compromised or malicious package upload.\n\nThe incident was identified and credited to OpenSSF's malicious-packages repository (MAL-2026-13935).

Indicators of compromise

Packages
  • datetime-fmt-xutil
IPs
  • 8.135.48.40

Remediation

  • Immediately uninstall datetime-fmt-xutil from all systems
  • Review npm audit logs and package-lock.json for installation history
  • Assume any machine that installed this package during the malicious period has been compromised; perform forensic analysis and credential rotation
  • Block outbound connections to 8.135.48.40 on port 4444 and monitor for HTTP beacons to 8.135.48.40/shell/failed
  • Update npm to the latest version and run 'npm audit' to identify other potentially compromised dependencies
  • Consider using npm package signing verification and private registry mirrors to prevent future malicious package installations

Sources

  1. GitHub Advisory GHSA-9f5m-3v9w-3xxj · GitHub Advisory Database

Cite this entry

"Malicious code in datetime-fmt-xutil (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 13, 2026; last updated August 13, 2026. https://supplychainattack.org/incident/malicious-code-in-datetime-fmt-xutil-npm-1q9c8w

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. 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
  2. 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
  3. 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
  4. containedcritical

    Malware in @siwatfa/yorn

    Malware was discovered in the npm package @siwatfa/yorn. Systems with this package installed or running should be considered fully compromised, with all secrets and keys requiring immediate rotation from a different computer.

    npmCompromised package