VDB
KO

MAL-2025-190657

Malicious code in @asyncapi/generator-helpers (npm)

Details

--- _-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (f5d32214c0ccb2ee8f88d55a002ca8bd58405c001051f75646cb765588ccfa9c) src/utils.js — reached via the package main src/index.js — contains an obfuscator.io IIFE that runs at module load. Alongside the legitimate helpers (getInfo, getTitle, toSnakeCase, toCamelCase), the file ships a rotated string array (_0x2d89), a custom lowercase-first base64 decoder (_0x1dd2), and a ~4KB opaque literal that decodes at runtime to further JavaScript. The top-level main() then invokes child_process.spawn on the Node runtime with '-e' and the decoded string, using {detached: true, stdio: 'ignore', windowsHide: true} so the child process is disowned and hidden. Because this fires unconditionally on require('@asyncapi/generator-helpers'), any consumer or generator template that loads this version executes attacker-controlled JavaScript in a detached Node process on the host. The behavior — obfuscator.io string-array plus custom-base64 blob reconstructed into node -e arguments — is not consistent with the package's documented purpose as an AsyncAPI generator helper library and matches a trojanized-release supply-chain compromise.

## Source: ghsa-malware (6c55b498d8766225c87bc5781438ffe36f84333b8bb731069bb0bac726cb6b3e) 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 (eaf9598bd0d64189828293050c590d3885311537cef7b91153a0df8cef9489f4) 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.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / @asyncapi/generator-helpers

No fixed version published yet for @asyncapi/generator-helpers (npm). Pin to a known-safe version or switch to an alternative.

References