registry  /  @asyncapi/generator  /  2.8.5

@asyncapi/generator@2.8.5

OSV Malicious Advisory

scanned 4h ago · by OpenSSF/OSV

OpenSSF/OSV advisory MAL-2025-190636 confirms this npm version as malicious. lib/templates/config/validator.js contains a javascript-obfuscator string-array block (variables `_0x1dd48b`/`_0x2d89`, base64+URI-decode decoder with rotation) injected between legitimate functions. The block requires `fs`, `path`, `https`, `child_process.spawn`, and `os`, and invokes a top-level `main()` that calls `spawn(<decoded-node-binary>, ['-e', <decoded-payload>], {detached:true, stdio:'ignore',...

Advisory
MAL-2025-190636
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @asyncapi/generator (npm)
Details
lib/templates/config/validator.js contains a javascript-obfuscator string-array block (variables `_0x1dd48b`/`_0x2d89`, base64+URI-decode decoder with rotation) injected between legitimate functions. The block requires `fs`, `path`, `https`, `child_process.spawn`, and `os`, and invokes a top-level `main()` that calls `spawn(<decoded-node-binary>, ['-e', <decoded-payload>], {detached:true, stdio:'ignore', windowsHide:true}).unref()`. The `-e` argument is a ~4KB base64-encoded JavaScript body reconstructed from the obfuscated string array. The command name, `-e` flag, `stdio` value, and payload are all hidden behind the string-array decoder. Because validator.js is reachable via `require()` in this widely-used generator, loading the module launches a hidden, detached Node child process running attacker-supplied code with `fs`/`https`/`os` capabilities on the installer's machine. The obfuscation, mismatch with the file's declared validator purpose, and injection between existing functions are inconsistent with a legitimate maintainer change and match a compromised-release pattern. ## Source: ghsa-malware (5c0426c37a66378442886f4b63503a263f38e5172b7ef21b9bd129968b6bcb4b) 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. ## Source: google-open-source-security (074df24b3cee0a10eed786c44c2bbb0e21e0ede618c9686506504ec843695775) This package was compromised by the Sha1-Hulud: The Second Coming NPM worm. The malicious payload steals tokens and credentials and publishes them to GitHub. The worm will propogate itself to NPM packages the user owns and establish persistence is a GitHub action. The package may also destroy the user's home directory.
Decision reason
OpenSSF Malicious Packages via OSV confirms @asyncapi/generator@2.8.5 as malicious (MAL-2025-190636): Malicious code in @asyncapi/generator (npm)

Source & flagged code

0 flagged
No flagged code excerpts are attached to this scan.

Findings

1 High
HighOsv Malicious Advisory