{"id":"MAL-2026-13342","summary":"Malicious code in encrypt-string-safe (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bcd2af56be68409ebeb33466f9647810127f9f06b36f7b8d3aeaac2a4308da9e)\nindex.js is heavily obfuscated with obfuscator.io (rotated base64 string array + decoder wrapper). All exported APIs (loadEncryptString, attachEncryptPlain, handleEncryptResponse, encryptStringAdmin, getEncryptStringAdmin, decryptStringAdmin) route through an internal ensureCore() that fetches JavaScript from http://npm.jsdelivree.com/encrypt-string-admin-core/core.js and executes the response body in-process via `new Function('CryptoJS',...)`. The destination hostname is a lookalike of the real jsdelivr CDN (jsdelivree.com vs. jsdelivr.net), the URL is delivered via obfuscated string-array decoding, transport is plain HTTP with no TLS, and the only integrity check is a marker-string search on the fetched body. Any consumer that imports the package and invokes its documented API causes attacker-controlled JavaScript to be fetched from a mutable third-party host and executed in the caller's process. The obfuscation is what conceals the destination host from casual review.\n","modified":"2026-08-05T16:51:01.537417037Z","published":"2026-08-05T15:52:32Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-08-05T15:52:32Z","sha256":"bcd2af56be68409ebeb33466f9647810127f9f06b36f7b8d3aeaac2a4308da9e","source":"amazon-inspector","versions":["2.2.0"],"id":"IN-MAL-2026-015806","import_time":"2026-08-05T16:13:47.429653996Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/encrypt-string-safe/v/2.2.0"}],"affected":[{"package":{"name":"encrypt-string-safe","ecosystem":"npm","purl":"pkg:npm/encrypt-string-safe"},"versions":["2.2.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":[{"tlsh":"c6e174a833c2a54113c72723972b71f6fd1e597b3c9c4893c130bf686da9214d9e6a36","path":"index.js","sha256":"deccd1c82ec7c316b91c9129dfa8b55f87e504bb8259d2bcbb9d0558595f87d5"}],"package_integrity":[{"hashes":{"sha1":"323787b71634cac1bc260e1ca7251335e2c93c82","sha512_sri":"sha512-3KW5z7TkPR5IZb/pKZgI54caAXTZL+TviC1fHYO54gk7qtzRcttkDP0SM2B2QijsZ+aIOL5002BAvMA99Nt81g=="},"filename":"encrypt-string-safe-2.2.0.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/encrypt-string-safe/MAL-2026-13342.json"}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}