Malicious code in @asyncapi/generator-components (npm)
@asyncapi/generator-components version 0.7.1 and earlier versions 0.3.2 and 0.3.3 were compromised in a supply-chain attack known as the "Miasma RAT" campaign. Malicious code was hidden using whitespace obfuscation and executed on package installation, downloading and running a remote access trojan (Miasma RAT). This malware steals sensitive credentials and secrets, establishes persistence, and communicates with a command-and-control server. The last known safe version is 0.7.0. Removal of the package alone may not fully remediate the compromise due to persistence mechanisms.
AI Analysis
Technical Summary
The @asyncapi/generator-components npm package versions 0.3.2, 0.3.3, and 0.7.1 were compromised on 2026-07-14 as part of the "Miasma RAT" supply-chain attack (campaign "miasma-train-p1"). Malicious code was appended after trailing spaces in a legitimate source file, evading casual code review. Upon installation, the injected code spawns a detached Node.js subprocess 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 (sync.js) in user-specific application data directories. The malware harvests browser credentials, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets, and communicates with a C2 server at IP 85.137.53.71 (Netherlands). An embedded Ethereum smart contract address suggests possible on-chain command or data exfiltration. The attack uses heavy obfuscation, runtime decoding, and stealth techniques inconsistent with legitimate package functionality. The last safe version is 0.7.0. Systems with this package installed should be considered fully compromised.
Potential Impact
Systems with affected versions of @asyncapi/generator-components installed are at risk of full compromise. The malicious payload executes remote code, downloads and runs a RAT that steals a wide range of sensitive credentials and secrets, including browser data, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets. Persistence is established, making removal difficult. The attacker gains remote control and can exfiltrate data or issue commands via a C2 server and possibly via an Ethereum smart contract. This compromises confidentiality, integrity, and availability of affected systems and data.
Mitigation Recommendations
No official patch or fix is currently available. The last known safe version is 0.7.0; users should downgrade to this version or remove the package entirely. However, because the RAT establishes persistence and fully compromises affected systems, simply removing or downgrading the package may not fully remediate the infection. All secrets and credentials stored on compromised systems should be considered exposed and rotated immediately from a clean, uncompromised environment. Incident response should include a full system investigation and remediation. Monitor vendor advisories for updates or official fixes.
Malicious code in @asyncapi/generator-components (npm)
Description
@asyncapi/generator-components version 0.7.1 and earlier versions 0.3.2 and 0.3.3 were compromised in a supply-chain attack known as the "Miasma RAT" campaign. Malicious code was hidden using whitespace obfuscation and executed on package installation, downloading and running a remote access trojan (Miasma RAT). This malware steals sensitive credentials and secrets, establishes persistence, and communicates with a command-and-control server. The last known safe version is 0.7.0. Removal of the package alone may not fully remediate the compromise due to persistence mechanisms.
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
The @asyncapi/generator-components npm package versions 0.3.2, 0.3.3, and 0.7.1 were compromised on 2026-07-14 as part of the "Miasma RAT" supply-chain attack (campaign "miasma-train-p1"). Malicious code was appended after trailing spaces in a legitimate source file, evading casual code review. Upon installation, the injected code spawns a detached Node.js subprocess 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 (sync.js) in user-specific application data directories. The malware harvests browser credentials, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets, and communicates with a C2 server at IP 85.137.53.71 (Netherlands). An embedded Ethereum smart contract address suggests possible on-chain command or data exfiltration. The attack uses heavy obfuscation, runtime decoding, and stealth techniques inconsistent with legitimate package functionality. The last safe version is 0.7.0. Systems with this package installed should be considered fully compromised.
Potential Impact
Systems with affected versions of @asyncapi/generator-components installed are at risk of full compromise. The malicious payload executes remote code, downloads and runs a RAT that steals a wide range of sensitive credentials and secrets, including browser data, SSH keys, npm tokens, GitHub CLI credentials, AWS secrets, and cryptocurrency wallets. Persistence is established, making removal difficult. The attacker gains remote control and can exfiltrate data or issue commands via a C2 server and possibly via an Ethereum smart contract. This compromises confidentiality, integrity, and availability of affected systems and data.
Mitigation Recommendations
No official patch or fix is currently available. The last known safe version is 0.7.0; users should downgrade to this version or remove the package entirely. However, because the RAT establishes persistence and fully compromises affected systems, simply removing or downgrading the package may not fully remediate the infection. All secrets and credentials stored on compromised systems should be considered exposed and rotated immediately from a clean, uncompromised environment. Incident response should include a full system investigation and remediation. Monitor vendor advisories for updates or official fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2025-190656
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-m6ch-4fxh-v72c"]
- Ecosystems
- ["npm"]
Threat ID: 6a577ee168715ace43b40679
Added to database: 07/15/2026, 12:36:49 UTC
Last enriched: 07/15/2026, 12:51:39 UTC
Last updated: 09/08/2026, 02:16:39 UTC
Views: 19
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.