{"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","modified":"2026-08-29T02:30:12.885855193Z","published":"2026-08-29T02:13:57Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-08-29T02:13:57Z","sha256":"8de9cc36a8817e94d67a46762e62e00a58e17077691ea1b4f649bc1f0d49e967","source":"amazon-inspector","versions":["1.0.0"],"id":"IN-MAL-2026-019140","import_time":"2026-08-29T02:22:21.00751341Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-fns-sync/v/1.0.0"}],"affected":[{"package":{"name":"date-fns-sync","ecosystem":"npm","purl":"pkg:npm/date-fns-sync"},"versions":["1.0.0"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"sha256":"073bdcb28a0c84a5727ffd17a000839641c6d64dcf2fb640ff83dba4ff6a130d","tlsh":"e0f0e25408bc8835022ff4bb061b5802a848e303392ee98a77ed5f441f1956d7eb56c8","path":"index.js"}],"package_integrity":[{"filename":"date-fns-sync-1.0.0.tgz","hashes":{"sha1":"792ac2214c7cd6d291c4fd1bbbce79487fbeca60","sha512_sri":"sha512-aYNJE4wnrB/c6T7k+BsacgReMvKBekqSFo0Pef3wWDmXbOQRymsHMzQD23/YQ5LIE8vk3VzZL/ihts+nYHG/EQ=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/date-fns-sync/MAL-2026-15551.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}