Malicious code in @asyncapi/generator (npm)
@asyncapi/generator versions 2.8.5, 2.8.6, and 3.3.1 were compromised in a supply-chain attack known as the "Miasma RAT" campaign. Malicious code was injected via whitespace hiding in a legitimate source file, which spawns a detached Node.js child process that downloads and executes a remote RAT binary. The malware establishes persistence by dropping a backdoor script and steals sensitive credentials and secrets including browser credentials, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets. The attacker also uses a command-and-control server and an embedded Ethereum smart-contract address for potential on-chain command or data exfiltration. The last known safe version is 3.3.0. Systems with this package installed should be considered fully compromised.
AI Analysis
Technical Summary
@asyncapi/generator versions =2.8.5, =2.8.6, and =3.3.1 were compromised on 2026-07-14 as part of the "Miasma RAT" supply-chain attack. The malicious code was stealthily injected into the lib/templates/config/validator.js file using whitespace hiding and obfuscated JavaScript string arrays. Upon loading, the injected code spawns a detached Node.js child process that downloads the Miasma RAT binary from IPFS, writes it to a platform-specific location, and executes it. The RAT establishes persistence by dropping a backdoor script named sync.js in user-specific application data directories. It harvests a wide range of sensitive credentials and secrets and communicates with a command-and-control server hosted in the Netherlands. An Ethereum smart-contract address is embedded, suggesting advanced on-chain command or exfiltration mechanisms. The malicious commit was pushed to the repository's next branch and is inconsistent with legitimate maintainer activity. The last safe version is 3.3.0. Removal of the package alone does not guarantee system cleanup due to the persistence and credential theft capabilities.
Potential Impact
Systems with affected versions of @asyncapi/generator installed are fully compromised. The malicious code executes with user privileges, downloads and runs a remote RAT, and establishes persistence. Sensitive credentials and secrets including browser credentials, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets may be stolen. The attacker gains remote control via a command-and-control server and may leverage an Ethereum smart-contract for command or data exfiltration. The compromise enables extensive unauthorized access and potential further propagation. Removal of the package does not guarantee removal of all malicious artifacts or attacker access.
Mitigation Recommendations
The last known safe version is 3.3.0. Users should immediately remove affected versions (=2.8.5, =2.8.6, =3.3.1) of @asyncapi/generator from their systems. Given the full compromise risk, all secrets, credentials, and keys stored on affected machines must be rotated from a separate, trusted environment. Because the malware establishes persistence and may have caused further system compromise, a full system forensic analysis and remediation is recommended. There is no official patch or fix beyond upgrading to a safe version. Users should monitor vendor advisories for updates. Removal of the package alone is insufficient to ensure system integrity.
Malicious code in @asyncapi/generator (npm)
Description
@asyncapi/generator versions 2.8.5, 2.8.6, and 3.3.1 were compromised in a supply-chain attack known as the "Miasma RAT" campaign. Malicious code was injected via whitespace hiding in a legitimate source file, which spawns a detached Node.js child process that downloads and executes a remote RAT binary. The malware establishes persistence by dropping a backdoor script and steals sensitive credentials and secrets including browser credentials, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets. The attacker also uses a command-and-control server and an embedded Ethereum smart-contract address for potential on-chain command or data exfiltration. The last known safe version is 3.3.0. Systems with this package installed should be considered fully compromised.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
@asyncapi/generator versions =2.8.5, =2.8.6, and =3.3.1 were compromised on 2026-07-14 as part of the "Miasma RAT" supply-chain attack. The malicious code was stealthily injected into the lib/templates/config/validator.js file using whitespace hiding and obfuscated JavaScript string arrays. Upon loading, the injected code spawns a detached Node.js child process that downloads the Miasma RAT binary from IPFS, writes it to a platform-specific location, and executes it. The RAT establishes persistence by dropping a backdoor script named sync.js in user-specific application data directories. It harvests a wide range of sensitive credentials and secrets and communicates with a command-and-control server hosted in the Netherlands. An Ethereum smart-contract address is embedded, suggesting advanced on-chain command or exfiltration mechanisms. The malicious commit was pushed to the repository's next branch and is inconsistent with legitimate maintainer activity. The last safe version is 3.3.0. Removal of the package alone does not guarantee system cleanup due to the persistence and credential theft capabilities.
Potential Impact
Systems with affected versions of @asyncapi/generator installed are fully compromised. The malicious code executes with user privileges, downloads and runs a remote RAT, and establishes persistence. Sensitive credentials and secrets including browser credentials, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets may be stolen. The attacker gains remote control via a command-and-control server and may leverage an Ethereum smart-contract for command or data exfiltration. The compromise enables extensive unauthorized access and potential further propagation. Removal of the package does not guarantee removal of all malicious artifacts or attacker access.
Mitigation Recommendations
The last known safe version is 3.3.0. Users should immediately remove affected versions (=2.8.5, =2.8.6, =3.3.1) of @asyncapi/generator from their systems. Given the full compromise risk, all secrets, credentials, and keys stored on affected machines must be rotated from a separate, trusted environment. Because the malware establishes persistence and may have caused further system compromise, a full system forensic analysis and remediation is recommended. There is no official patch or fix beyond upgrading to a safe version. Users should monitor vendor advisories for updates. Removal of the package alone is insufficient to ensure system integrity.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2025-190636
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-9658-p648-rc4q"]
- Ecosystems
- ["npm"]
Threat ID: 6a577ee168715ace43b40682
Added to database: 07/15/2026, 12:36:49 UTC
Last enriched: 07/15/2026, 12:51:53 UTC
Last updated: 09/08/2026, 02:09:57 UTC
Views: 37
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.