Skip to content

Malicious code in datefmt-simple-utils (npm)

Malware Published Aug 14, 2026 to the GitHub Advisory Database • Updated Aug 14, 2026

Package

npm datefmt-simple-utils (npm)

Affected versions

= 1.0.0

Patched versions

None

Description

Source: amazon-inspector (7edc0c1f9cc25265504ab10c2634c3ea17e4028ff8412d4d7f4b22c41c33c3c9)

datefmt-simple-utils presents itself as a date-formatting utility, but its package.json declares scripts.postinstall="node postinstall.js", which fires automatically on npm install. postinstall.js connects a TCP socket to the hardcoded remote host 8.135.48.40 on port 4444 and attaches an interactive /bin/bash to that socket, giving the remote endpoint full command execution on the installer's machine. Three fallback techniques target the same host: a python3 pty.spawn reverse shell, a python3 subprocess-based variant, and a Node net.connect + spawn('/bin/bash', ['-i']) variant. The advertised date-formatting purpose is a cover story; no such functionality is wired into the install-time code path.


Credit: OpenSSF (source)

References

Published to the GitHub Advisory Database Aug 14, 2026
Reviewed Aug 14, 2026
Last updated Aug 14, 2026

EPSS score

Weaknesses

Embedded Malicious Code

The product contains code that appears to be malicious in nature. Learn more on MITRE.

GHSA ID

GHSA-8hx5-vj8g-mqv7

Source code

No known source code
Improvements are not currently accepted on this advisory because this package is malware and has no patched versions. If there is something to change, please open an issue at https://github.com/github/advisory-database/issues.