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

目标: 1000 元 · 已筹: 1359 元

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

date-fns-formatter

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

Summary

Malicious code in date-fns-formatter (npm)

凭据/密钥窃取安装阶段执行文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
0
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmdate-fns-formatter*
npmdate-fns-formatter1.3.10
npmdate-fns-formatter1.3.8
npmdate-fns-formatter1.3.9
npmdate-fns-formatter1.4.9
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-15974","published":"2026-09-06T03:03:07Z","modified":"2026-09-08T19:16:49.410937967Z","aliases":["GHSA-h258-m2gc-2p4q"],"summary":"Malicious code in date-fns-formatter (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (e9839e9520db45a2a739a415767a8258e15afee65cee71fe5ff41777cbd22450)\nThe package impersonates the popular date-fns library. Its main module, date-fns-formatter.js, contains a small formatDate shim as a decoy in front of a heavily obfuscated IIFE (obfuscator.io-style rotated string array with a runtime decoder) that runs whenever the module is required. The IIFE creates a hidden directory under os.homedir(), writes a package.json declaring axios, better-sqlite3, node-machine-id, and socket.io-client (plus ffi-napi on Windows), invokes npm install (via npm.cmd through cmd.exe on Windows) to fetch those dependencies, decodes and writes a second obfuscated script (main.js) reassembled from a ~200-piece string array containing base64-encoded https:// URL fragments, and spawns node main.js. On Windows a.vbs wrapper is written that uses WScript.Shell.Run(..., 0, False) to launch the second stage hidden and detached. The provisioned second stage (socket.io-client + node-machine-id + ffi-napi) is a persistent WebSocket remote-agent keyed by a stable host fingerprint, enabling remote command execution on the installer's host. The manifest also self-references date-fns-formatter as its own dependency, and the README example is nonsensical, consistent with a cover-story typosquat rather than a broken legitimate package.\n\n## Source: ghsa-malware (4697d7421598f74c2fab37872abece4c92699f612f6b4e54c7eb6c5a1b51d7c1)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","affected":[{"package":{"name":"date-fns-formatter","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.3.8","1.3.10","1.4.9","1.3.9"],"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":"date-fns-formatter.js","sha256":"9bf2b2c9758f58aae218e03236ce1191815bd081cb23c878106c421c97dd9ca0","tlsh":"2e62938c6e15f3886305607f6a1a96c5f86589813ccf81a4f2c65894f91af74e1bef0b"},{"path":"package.json","sha256":"6e4208f1278d278fc35d09199b05d1739d9d19c373766670c377c79a6f0e46e0","tlsh":"65014728c8205d6344da58edacf80543ff1069031d14bc0e779f535c4b0d97b94bd69e"}]}}}],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-h258-m2gc-2p4q"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-fns-formatter/v/1.3.8"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-fns-formatter/v/1.3.10"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-fns-formatter/v/1.4.9"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-fns-formatter/v/1.3.9"}],"database_specific":{"malicious-packages-origins":[{"id":"GHSA-h258-m2gc-2p4q","import_time":"2026-09-07T01:51:49.995697Z","modified_time":"2026-09-06T03:03:08Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"4697d7421598f74c2fab37872abece4c92699f612f6b4e54c7eb6c5a1b51d7c1","source":"ghsa-malware"},{"id":"IN-MAL-2026-019685","import_time":"2026-09-08T19:15:04.278427907Z","modified_time":"2026-09-08T19:09:03Z","sha256":"30a385c281b715de9ad8540342bfb6b592dc7688d3dc8e8bef5eea52c013ad51","source":"amazon-inspector","versions":["1.3.8"]},{"id":"IN-MAL-2026-019681","import_time":"2026-09-08T19:15:04.170229787Z","modified_time":"2026-09-08T19:08:26Z","sha256":"548457e90ad2b7512c9bff16ed57e12035536d071c129a715fb086eef02f7074","source":"amazon-inspector","versions":["1.3.10"]},{"id":"IN-MAL-2026-019683","import_time":"2026-09-08T19:15:04.223915873Z","modified_time":"2026-09-08T19:08:43Z","sha256":"c699acf542e5445bdd7b31dd2927d59cf860e51da465fbb9479f14768f0f03f5","source":"amazon-inspector","versions":["1.4.9"]},{"id":"IN-MAL-2026-019682","import_time":"2026-09-08T19:15:04.19604903Z","modified_time":"2026-09-08T19:08:35Z","sha256":"e9839e9520db45a2a739a415767a8258e15afee65cee71fe5ff41777cbd22450","source":"amazon-inspector","versions":["1.3.9"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}

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