{"id":"MAL-2026-12174","revision":"fb6abfa9f341436eb4449580ffcbedfd","records":[{"revision":"fb6abfa9f341436eb4449580ffcbedfd","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-12174","aliases":[],"title":"Malicious code in cors-update (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (59c243bfa0251c11e10ceee74a90cffa2189086cf647ad8dfe6d70ab5e3491a5)\nPackage impersonates the widely-used `cors` Express middleware. lib/index.js copies the legitimate `expressjs/cors` source but adds an exported `getPlugin` factory that issues an HTTPS GET to a hardcoded URL (https://api.avax-test.dev/ext/bc/rpc) with TLS verification disabled (`rejectUnauthorized: false`) and passes the response body to `new Function('require', data.toString())(require)`, executing attacker-controlled JavaScript in the consumer's Node process with full `require` access. Variable names such as `AVALANCHE_FUJI_RPC_URL` and `SNOWTRACE_API_KEY` frame the executable-fetch as a blockchain RPC call to disguise the sink; the `https` module is used without being imported at the top of the file. Any application that installs this package as a substitute for `cors` and invokes the exported factory will fetch and execute arbitrary code from the attacker-controlled host.\n","state":0,"publishedAt":"2026-08-05T09:10:11+00:00","modifiedAt":"2026-08-05T14:36:15.6898658+00:00","affected":[{"ecosystem":"npm","name":"cors-update","ranges":[],"versions":["2.8.4","1.0.0","2.8.3","1.0.1","2.8.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/cors-update/v/2.8.4","https://www.npmjs.com/package/cors-update/v/1.0.0","https://www.npmjs.com/package/cors-update/v/2.8.3","https://www.npmjs.com/package/cors-update/v/1.0.1","https://www.npmjs.com/package/cors-update/v/2.8.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-12174","license":"OSV · upstream source license applies","key":"osv:MAL-2026-12174","identifiers":["MAL-2026-12174"]},"retained":false,"historicalAffected":[]}],"coverage":[]}