MAL-2026-15551Malicious code in date-fns-sync (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | date-fns-sync | 1.0.0 |
{"modified":"2026-08-29T02:13:57Z","published":"2026-08-29T02:13:57Z","schema_version":"1.7.4","id":"MAL-2026-15551","summary":"Malicious code in date-fns-sync (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (8de9cc36a8817e94d67a46762e62e00a58e17077691ea1b4f649bc1f0d49e967)\npackage.json declares scripts.postinstall = 'node index.js'. index.js reconstructs a URL from a String.fromCharCode integer array — decoding to https://kongregate-api-config.vercel.app/ — fetches JSON from that endpoint, and passes the returned 'token' field directly to eval(). This executes attacker-controlled JavaScript on the installer's machine at npm install time. The destination is not a package publisher domain, the fetched payload is opaque and mutable, and the URL is deliberately concealed via char-code assembly to evade static analysis. The package's README describes it as a caching module, which does not match the observed behavior.\n","affected":[{"package":{"ecosystem":"npm","name":"date-fns-sync"},"versions":["1.0.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"073bdcb28a0c84a5727ffd17a000839641c6d64dcf2fb640ff83dba4ff6a130d","tlsh":"e0f0e25408bc8835022ff4bb061b5802a848e303392ee98a77ed5f441f1956d7eb56c8"}],"package_integrity":[{"filename":"date-fns-sync-1.0.0.tgz","hashes":{"sha1":"792ac2214c7cd6d291c4fd1bbbce79487fbeca60","sha512_sri":"sha512-aYNJE4wnrB/c6T7k+BsacgReMvKBekqSFo0Pef3wWDmXbOQRymsHMzQD23/YQ5LIE8vk3VzZL/ihts+nYHG/EQ=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-fns-sync/v/1.0.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-019140","import_time":"2026-08-29T02:22:21.00751341Z","modified_time":"2026-08-29T02:13:57Z","sha256":"8de9cc36a8817e94d67a46762e62e00a58e17077691ea1b4f649bc1f0d49e967","source":"amazon-inspector","versions":["1.0.0"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0