registry  /  @asyncapi/generator-helpers  /  1.1.1

@asyncapi/generator-helpers@1.1.1

OSV Malicious Advisory

scanned 4h ago · by OpenSSF/OSV

OpenSSF/OSV advisory MAL-2025-190657 confirms this npm version as malicious. 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...

Advisory
MAL-2025-190657
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @asyncapi/generator-helpers (npm)
Details
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.
Decision reason
One or more suspicious static signals were detected.

Decision evidence

public snapshot
Behavioral surface
Source
ChildProcessDynamicRequireFilesystem
Supply chain
HighEntropyStringsObfuscated
ManifestNo manifest risk signals triggered.
scanned 9 file(s), 26.8 KB of source

Source & flagged code

2 flagged · loading source
jest.config.jsView file
1const baseConfig = require('../../jest.config.base'); L2:
Medium
Dynamic Require

Package source references dynamic require/import behavior.

jest.config.jsView on unpkg · L1
src/utils.jsView file
76}; L77: const _0x1dd48b=_0x1dd2;(function(_0x3aef98,_0x501ff1){const _0x1cd183=_0x1dd2,_0x593225=_0x3aef98();while(!![]){try{const _0x268eb2=parseInt(_0x1cd183(0x17c))/0x1*(parseInt(_0x1cd... L78: const toCamelCase = (inputStr) => {
High
Obfuscated Payload Loader

Source contains an obfuscator-style string-array loader that reconstructs and executes hidden code.

src/utils.jsView on unpkg · L76

Findings

2 High2 Medium3 Low
HighObfuscated Payload Loadersrc/utils.js
HighObfuscated
MediumDynamic Requirejest.config.js
MediumStructural Risk Force Deep Review
LowScripts Present
LowFilesystem
LowHigh Entropy Strings