{"id":"MAL-2026-4531","summary":"Malicious code in clsx-js (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (23e4e85f63d161234d84c774fdff696827934a27282be2ce9ff362a756246ee6)\nOn `npm install`, dist/postinstall.js base64-decodes the URL https://api.npoint.io/984b75c022a70cf00c39, fetches JSON from this anonymous mutable JSON-hosting service via axios, and pipes the response's `data.content` into a detached `node` child process's stdin for execution. The fetch has no version pin, no hash/signature verification, and the source is operator-mutable — the attacker can swap the executed payload at any time. The package additionally typosquats the widely-used `clsx` utility (by Luke Edwards): name is a one-token edit, and the description, author name, email, and homepage are copied verbatim from the legitimate `clsx` to impersonate the upstream maintainer. The genuine `clsx` ships no postinstall; this fork adds one whose only purpose is the remote-code dropper. A malformed `Dependencies` (capital-D) field also lists `child_process`, a known squat name. Installing this package on any machine results in arbitrary attacker-controlled code execution under the installer's user account.\n\n## Source: ghsa-malware (64650ce568f6dcb32276c86bc8e12ed0ea072a19425670e47310e7f4b3b01715)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","aliases":["GHSA-8jmh-pvvx-wjrf"],"modified":"2026-06-09T15:31:28.932296043Z","published":"2026-05-19T19:05:59Z","database_specific":{"malicious-packages-origins":[{"sha256":"23e4e85f63d161234d84c774fdff696827934a27282be2ce9ff362a756246ee6","id":"IN-MAL-2026-003696","import_time":"2026-05-26T05:51:07.855735683Z","source":"amazon-inspector","versions":["1.0.4"],"modified_time":"2026-05-21T01:34:43Z"},{"sha256":"2bc88378968921e5e583cd044040b7ac4c6a516c16741aa082d8e080c18329c0","id":"IN-MAL-2026-003252","import_time":"2026-05-26T05:50:17.815063977Z","source":"amazon-inspector","versions":["1.0.3"],"modified_time":"2026-05-19T19:05:59Z"},{"id":"IN-MAL-2026-003694","sha256":"e280d8130a74a6db6f6960780c8e181e1abfcc2c759d9c31a3d987fa282d27bf","import_time":"2026-05-26T05:51:07.639262727Z","source":"amazon-inspector","versions":["1.0.5"],"modified_time":"2026-05-21T01:33:56Z"},{"id":"GHSA-8jmh-pvvx-wjrf","sha256":"64650ce568f6dcb32276c86bc8e12ed0ea072a19425670e47310e7f4b3b01715","import_time":"2026-06-09T15:22:39.843009832Z","source":"ghsa-malware","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"modified_time":"2026-06-09T14:47:43Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/clsx-js/v/1.0.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/clsx-js/v/1.0.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/clsx-js/v/1.0.5"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-8jmh-pvvx-wjrf"}],"affected":[{"package":{"name":"clsx-js","ecosystem":"npm","purl":"pkg:npm/clsx-js"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.4","1.0.3","1.0.5"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/clsx-js/MAL-2026-4531.json","indicators":{"package_integrity":[{"hashes":{"sha512_sri":"sha512-Uff8NiMf4/IPKA5kXpZxR6TUoa56QOrfT65DUzL/taNBgsrwD97tN1/YZV7tPr9sHlz1AiBhtPN+p3RiT3bTxQ==","sha1":"75b0b4f73ec69708208258980071807772ecfd84"},"filename":"clsx-js-1.0.4.tgz"}],"evidence_files":[{"sha256":"5f56892ba3e5445aeef5969d124d114477512fefd77a309082e3d77381c03d00","path":"dist/postinstall.js","tlsh":"17e0e52f723a67792f7009c4993296374d12d021f2c2e1e0a95d44576e87746450bfd8"},{"sha256":"f26866b6014efa39781457ef33410973c3129aae5f3356dd8cd7a4bd4c9b75f8","path":"package.json","tlsh":"8b21f328d4a44d6322da66e9a82e4157e960090b4b587e2833de416c8f4d69f90ff3de"}]},"cwes":[{"description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506","name":"Embedded Malicious Code"},{"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","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506","name":"Embedded Malicious Code"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"}]}