MAL-2026-14509Malicious code in r4wk-book (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | r4wk-book | * |
| npm | r4wk-book | 2.2.2 |
{"schema_version":"1.7.4","id":"MAL-2026-14509","published":"2026-08-25T16:36:51Z","modified":"2026-08-25T22:11:54.859643655Z","aliases":["GHSA-jqfp-p3qc-cqm9"],"summary":"Malicious code in r4wk-book (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (7f5cbca68751eb879140f7c896a0dc3c324e9f4dbc8a1651b38b246b299ba4eb)\nOn npm install, the package's postinstall hook runs `node.worker.js`, which detaches a background child, waits a jittered delay, and opens a TCP socket to a base64-encoded host:port literal that decodes to 172.16.42.138:1234. It then spawns `/bin/sh -i` (or `cmd.exe` on Windows) and pipes the socket to the shell's stdin and the shell's stdout back to the socket, giving whoever controls that address an interactive shell on the installer's machine. The destination is stored as `Buffer.from('MTcyLjE2LjQyLjEzODoxMjM0Cg==','base64').toString().split(':')` rather than a plain literal, concealing the endpoint. The package.json advertises a generic purpose (\"Background sync module for legacy systems\") and declares itself as its own dependency (`r4wk-book: ^2.2.1`), consistent with a throwaway lure rather than a functional library.\n\n## Source: ghsa-malware (fca7aeb2a2052ce1bdd6d78ef66f735c8a3f1ab10b00d07d6e9dae8189722728)\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","affected":[{"package":{"name":"r4wk-book","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["2.2.2"],"database_specific":{"cwes":[{"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.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":".worker.js","sha256":"560ea04945fdf6c2ffaf1e3c70492a193209d536a8476d23e093a0efd906ea44","tlsh":"a2211548f67b562c13f205f19633a937061760003327caf8771d9651af5372eb1a76da"},{"path":"package.json","sha256":"2306bfdde79e2a90edc140a9817d96ab8508802d30b94fd9a558ac67235cb4f5","tlsh":"1dd05b14cc60a77375ca29bd587c514259701d57510cad1e65cf5048434d1fa74ffaa6"}]}}}],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-jqfp-p3qc-cqm9"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/r4wk-book/v/2.2.2"}],"database_specific":{"malicious-packages-origins":[{"id":"GHSA-jqfp-p3qc-cqm9","import_time":"2026-08-25T17:25:28.265416925Z","modified_time":"2026-08-25T16:36:56Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"fca7aeb2a2052ce1bdd6d78ef66f735c8a3f1ab10b00d07d6e9dae8189722728","source":"ghsa-malware"},{"id":"IN-MAL-2026-018739","import_time":"2026-08-25T22:10:01.364873272Z","modified_time":"2026-08-25T21:44:06Z","sha256":"7f5cbca68751eb879140f7c896a0dc3c324e9f4dbc8a1651b38b246b299ba4eb","source":"amazon-inspector","versions":["2.2.2"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}数据来源:OpenSSF Malicious Packages · Apache-2.0