MAL-2026-10684Malicious code in react-hook-scripts (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | react-hook-scripts | 5.4.2 |
{"modified":"2026-07-15T15:45:21Z","published":"2026-07-15T15:45:21Z","schema_version":"1.7.4","id":"MAL-2026-10684","summary":"Malicious code in react-hook-scripts (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (52d4b717c5de5139b732e16ea9eca2654947ecf17e919334a6dd039c5b60e059)\nThe package's default export `getPlugin` fetches a JSON document from the hardcoded endpoint https://svganchordev.net/icons/108 and passes the returned `credits` field to `new Function('require','module','exports',...,'Promise', data.credits)`, executing the server-supplied string as JavaScript with full Node.js globals (require, process, Buffer) available. The remote URL is assembled by concatenating protocol/separator/domain/path fragments and the request is framed with an `bearrtoken: \"logo\"` header and an icon-retrieval path, disguising a remote code loader as an SVG helper despite the package's advertised role as a React/SVG utility. Declared dependencies (@primno/dpapi for Windows DPAPI decryption, better-sqlite3, node-machine-id) are consistent with a credential and host-fingerprint stealer stage delivered by the fetched payload. Any caller of the advertised API triggers execution of arbitrary attacker-controlled code on the installer's host, and the payload can be changed server-side at any time.\n","affected":[{"package":{"ecosystem":"npm","name":"react-hook-scripts"},"versions":["5.4.2"],"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":"bbf2e5eb654fae0b706618a4172fda87c34834fb2bfeb503bb5a262dd8d3b0b8","tlsh":"ebc1616546fa31a36a67e4eef30f10027165e3133759e971f48e42902fca568e5f24e8"}],"package_integrity":[{"filename":"react-hook-scripts-5.4.2.tgz","hashes":{"sha1":"19b2b7c619e2e677568d190167a2a650e1f50af6","sha512_sri":"sha512-hZyPz/YpF/r0n/r39F44mgR+IQAgy+P+bSACdlniifnmG1zcIy2c8gNa5utoxow6GixPUUejbzQNFe0WMo1G4A=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/react-hook-scripts/v/5.4.2"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-010684","import_time":"2026-07-15T16:34:36.342742205Z","modified_time":"2026-07-15T15:45:21Z","sha256":"52d4b717c5de5139b732e16ea9eca2654947ecf17e919334a6dd039c5b60e059","source":"amazon-inspector","versions":["5.4.2"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0