# AsyncAPI Under Attack: When 2 Million Downloads Per Week Becomes a Way to Spread Malware

## Campaign Summary

On July 14, 2026, attackers successfully compromised the AsyncAPI organization on npm — one of the most popular open source projects for event-driven APIs, and injected malicious code into 4 npm packages with a total of more than 2 million downloads per week. This is an extremely sophisticated software supply chain attack, combining three types of malware: info-stealer, crypto-stealer, and Remote Access Trojan (RAT).

What's especially dangerous: the attack does not use post-install scripts (which are blocked by npm v12), but instead embeds malicious code directly into the main JavaScript file of each package. Malware is activated as soon as the module is imported/required — making the `npm install --ignore-scripts` command completely useless.

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/77d26988-2250-4195-a2fd-b749ab9e867d.png align="center")

## Affected Packages

| npm package | Infected version | Safe version | Downloads/week (estimated) |
| --- | --- | --- | --- |
| `@asyncapi/generator` | 3.3.1 | 3.3.0 | ~100K |
| `@asyncapi/generator-helpers` | 1.1.1 | 1.1.0 | ~50K |
| `@asyncapi/generator-components` | 0.7.1 | 0.7.0 | ~50K |
| `@asyncapi/specs` | 6.11.2, 6.11.2-alpha.1 | 6.11.1 | ~2.7M |

## Event Timeline

### Before the day of the attack

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Time</strong></p></td><td colspan="1" rowspan="1"><p><strong>Event</strong></p></td><td colspan="1" rowspan="1"><p><strong>Significance</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>04/29/2026</strong></p></td><td colspan="1" rowspan="1"><p>The <code>pull_request_target</code> vulnerability in the <code>asyncapi/generator</code> repo is identified via a Proof-of-Concept.</p></td><td colspan="1" rowspan="1"><p>Attackers (or third parties) knew how to exploit it early on.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>05/17/2026</strong></p></td><td colspan="1" rowspan="1"><p>A fix is proposed via a Pull Request.</p></td><td colspan="1" rowspan="1"><p>The fix has NOT been merged — leaving the exploitation window open for nearly 2 months.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>07/14/2026</strong></p></td><td colspan="1" rowspan="1"><p>Date the attack takes place.</p></td><td colspan="1" rowspan="1"><p>The vulnerability still exists on production.</p></td></tr></tbody></table>

### Developments on July 14, 2026

<table style="min-width: 214px;"><colgroup><col style="min-width: 25px;"><col style="width: 114px;"><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Time (UTC)</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p><strong>Stage</strong></p></td><td colspan="1" rowspan="1"><p><strong>Action</strong></p></td><td colspan="1" rowspan="1"><p><strong>Technical Details</strong></p></td><td colspan="1" rowspan="1"><p><strong>Impact</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>05:08</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 0 — Credential Theft</p></td><td colspan="1" rowspan="1"><p>Opened 37 Pull Requests to the <code>asyncapi/generator</code> repo</p></td><td colspan="1" rowspan="1"><p>One PR contained obfuscated JavaScript designed to execute in the <code>pull_request_target</code> workflow.</p></td><td colspan="1" rowspan="1"><p>Created "noise" to hide the PR containing the actual malicious code.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>05:08 – 06:57</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 0 — Credential Theft</p></td><td colspan="1" rowspan="1"><p>CI/CD workflow triggered, exfiltrated the release bot's token</p></td><td colspan="1" rowspan="1"><p><code>pull_request_target</code> checked out the attacker's code instead of the base branch → ran malicious code with access to repository secrets.</p></td><td colspan="1" rowspan="1"><p>Attacker obtained a legitimate npm publish token.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>06:58</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 1 — Code Injection</p></td><td colspan="1" rowspan="1"><p>Pushed malicious commit to the <code>next</code> branch</p></td><td colspan="1" rowspan="1"><p>Used the stolen token to push directly into the repo.</p></td><td colspan="1" rowspan="1"><p>Triggered the legitimate release pipeline.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>07:10</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 1 — Package Publish</p></td><td colspan="1" rowspan="1"><p>Published 3 generator packages to npm</p></td><td colspan="1" rowspan="1"><p>The <code>release-with-changesets.yml</code> workflow automatically published via OIDC trusted-publisher.</p></td><td colspan="1" rowspan="1"><p><code>@asyncapi/generator@3.3.1</code>, <code>generator-helpers@1.1.1</code>, <code>generator-components@0.7.1</code> — all carrying valid provenance.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>08:06</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 1 — Package Publish</p></td><td colspan="1" rowspan="1"><p>Published <code>@asyncapi/specs@6.11.2</code></p></td><td colspan="1" rowspan="1"><p>Same legitimate pipeline mechanism.</p></td><td colspan="1" rowspan="1"><p>The package with ~2.7M weekly downloads began distributing malware.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>08:30</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 1 — Package Publish</p></td><td colspan="1" rowspan="1"><p>Published <code>@asyncapi/specs@6.11.2-alpha.1</code></p></td><td colspan="1" rowspan="1"><p>Additional alpha version published.</p></td><td colspan="1" rowspan="1"><p>Expanded the blast radius to include early adopters.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>08:30 – 11:18</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Stage 2 — Active Exploitation</p></td><td colspan="1" rowspan="1"><p>Malware executed on victim's machine upon <code>import/require()</code></p></td><td colspan="1" rowspan="1"><p>Spawned a detached Node.js process → downloaded <code>sync.js</code> from IPFS → decrypted Miasma RAT → established persistence + C2.</p></td><td colspan="1" rowspan="1"><p>Developers and CI/CD runners infected when building/testing with the new packages.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>~11:18</strong></p></td><td colspan="1" rowspan="1" colwidth="114"><p>Response</p></td><td colspan="1" rowspan="1"><p>Unpublished all 5 versions from the npm registry</p></td><td colspan="1" rowspan="1"><p>AsyncAPI team responded after receiving alerts.</p></td><td colspan="1" rowspan="1"><p>Stopped malware distribution via npm.</p></td></tr></tbody></table>

## Hacker Profile

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/45ee71b2-c70a-4dc8-acfd-9ce0d0a50137.png align="center")

### TeamPCP — Overview

The Shai-Hulud and Miasma campaigns are tracked by the security industry under a threat actor group called TeamPCP, also known by many aliases:

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Tracking Source / Description</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>PCP</strong></p></td><td colspan="1" rowspan="1"><p>Primary name, used by OX Security, JFrog, Snyk</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>DeadCatx3</strong></p></td><td colspan="1" rowspan="1"><p>Alias on underground forums</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>PCPcat</strong></p></td><td colspan="1" rowspan="1"><p>Variant name on some trackers</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>ShellForce / CipherForce</strong></p></td><td colspan="1" rowspan="1"><p>Alias tracked by some threat intelligence firms</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>CanisterWorm</strong></p></td><td colspan="1" rowspan="1"><p>Name based on worm technical characteristics</p></td></tr></tbody></table>

General characteristics:

*   Specializes in attacking software supply chains through open source registries (npm, PyPI, Cargo)
    
*   Exploit CI/CD pipeline, GitHub Actions, developer credentials to distribute malware at scale
    
*   Target open source "load-bearing" infrastructure — foundational packages relied on by millions of projects — to maximize blast radius
    
*   Operates under an organized cybercrime model, not a national APT (state-sponsored)
    

### Campaign History — From Shai-Hulud To AsyncAPI

<table style="min-width: 125px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Time</strong></p></td><td colspan="1" rowspan="1"><p><strong>Campaign</strong></p></td><td colspan="1" rowspan="1"><p><strong>Target</strong></p></td><td colspan="1" rowspan="1"><p><strong>Main Technique</strong></p></td><td colspan="1" rowspan="1"><p><strong>Scale / Impact</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>09/2025</strong></p></td><td colspan="1" rowspan="1"><p>Shai-Hulud (Original)</p></td><td colspan="1" rowspan="1"><p>General npm ecosystem</p></td><td colspan="1" rowspan="1"><p>Self-replicating npm worm, install-time hooks (<code>preinstall</code>/<code>postinstall</code>), npm token + GitHub PAT theft.</p></td><td colspan="1" rowspan="1"><p>Hundreds of packages infected; marked the turning point from typosquatting to automated worms.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>04–05/2026</strong></p></td><td colspan="1" rowspan="1"><p>Mini Shai-Hulud (Wave 1)</p></td><td colspan="1" rowspan="1"><p>TanStack, Mistral AI, Guardrails AI, UiPath</p></td><td colspan="1" rowspan="1"><p>GitHub Actions "pwn request" + cache poisoning + OIDC token theft → published packages with valid SLSA Build Level 3 provenance.</p></td><td colspan="1" rowspan="1"><p>First time in history: valid provenance was weaponized.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>05/12/2026</strong></p></td><td colspan="1" rowspan="1"><p>Open-source Shai-Hulud</p></td><td colspan="1" rowspan="1"><p>Hacker community</p></td><td colspan="1" rowspan="1"><p>TeamPCP published the worm's source code on forums.</p></td><td colspan="1" rowspan="1"><p>Turned a proprietary tool into "commodity malware" — anyone could create variants.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>05/18/2026</strong></p></td><td colspan="1" rowspan="1"><p>Megalodon (Wave 2)</p></td><td colspan="1" rowspan="1"><p>GitHub repositories</p></td><td colspan="1" rowspan="1"><p>Pushed over 5,000 malicious commits to repos for large-scale secret exfiltration.</p></td><td colspan="1" rowspan="1"><p>Brute-force attack on source code infrastructure.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>05/19/2026</strong></p></td><td colspan="1" rowspan="1"><p>Wave 5</p></td><td colspan="1" rowspan="1"><p><code>@antv</code> ecosystem</p></td><td colspan="1" rowspan="1"><p>Automated attack.</p></td><td colspan="1" rowspan="1"><p>600+ packages compromised in 22 minutes.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>06/2026</strong></p></td><td colspan="1" rowspan="1"><p>Miasma — Red Hat</p></td><td colspan="1" rowspan="1"><p><code>@redhat-cloud-services</code> npm packages</p></td><td colspan="1" rowspan="1"><p>"Phantom Gyp" (malicious <code>binding.gyp</code>), Bun-staged loaders, preinstall hooks.</p></td><td colspan="1" rowspan="1"><p>Dozens of Red Hat packages infected; credential stealers injected into frontend libraries.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>06/2026</strong></p></td><td colspan="1" rowspan="1"><p>Miasma — LeoPlatform</p></td><td colspan="1" rowspan="1"><p>LeoPlatform / RStreams</p></td><td colspan="1" rowspan="1"><p>Phantom Gyp + Bun loaders, bypassed Node.js security tools.</p></td><td colspan="1" rowspan="1"><p>Serverless data pipeline compromised.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>07/14/2026</strong></p></td><td colspan="1" rowspan="1"><p>AsyncAPI (this analysis)</p></td><td colspan="1" rowspan="1"><p><code>@asyncapi</code> npm org (4 packages, ~2.9M weekly downloads)</p></td><td colspan="1" rowspan="1"><p>CI/CD pwn request → import-time execution (bypassed <code>ignore-scripts</code>) → Miasma RAT + IPFS/Nostr/Ethereum C2.</p></td><td colspan="1" rowspan="1"><p>Biggest evolution: no install hooks required, bypassed npm v12.</p></td></tr></tbody></table>

## Detailed Technical Analysis

### Phase 0 — Stealing Credentials via "Pwn Request"

The attack did not start from npm but from GitHub Actions. An attacker exploits a misconfiguration vulnerability in the CI/CD workflow:

*   05:08 UTC: Attacker opens 37 pull requests to repository asyncapi/generator.
    
*   One of them contains obfuscated JavaScript designed to run in a workflow using the `pull_request_target` trigger.
    
*   Trigger `pull_request_target` executes with access to repository secrets — instead of a sandbox like pull\_request, Workflow has already checked out the attacker's code instead of the base branch, allowing the release bot's token to be exfiltrated
    

### Phase 1 — Taking advantage of the Legal Release Pipeline

After having the token, the attacker:

1.  Push the malicious commit to the next branch at 06:58 UTC
    
2.  This action triggers the legal workflow release-with-changesets.yml
    
3.  Packages are published through GitHub's OIDC trusted-publisher system
    
4.  Result: Packages carry valid provenance/SLSA attestation — because they are published via the official GitHub Actions pipeline
    

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/80196ba0-c290-46b6-bdae-b96d1a8088d8.png align="center")

### Phase 2 — Import-Time Execution

Malicious code does NOT use install hooks (post-install script). Instead:

*   Malicious code is embedded inside a legitimate source code file
    
*   When the module is loaded (require() or imported), it spawns a separate Node.js process (detached).
    
*   This process loads the encrypted loader (sync.js) from IPFS
    
*   Then decode and deploy the full Miasma framework
    

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/94053d71-4efd-4b01-9aa9-f492bfe56db1.png align="center")

Direct consequence: npm install --ignore-scripts does NOT protect against this attack.

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/96013cfa-eec9-47fb-9abd-db020840c368.png align="center")

## Malware Analysis — Payload Miasma RAT

### Scale and Complexity

*   91,973 lines of code — this is not "quickly written" malware
    
*   Hybrid combination: Info-stealer + Crypto-stealer + RAT + Worm
    
*   Cross-platform: Supports Linux, macOS, Windows
    

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/6034b2da-c7e8-43ab-85e2-78e1b9340a0a.png align="center")

### Persistence (Maintained on the System)

Miasma installs sync.js into a folder pretending to be NodeJS for each platform:

| **OS** | Persistence path |
| --- | --- |
| **Linux** | `~/.local/share/NodeJS/sync.js` |
| **macOS** | `~/Library/Application Support/NodeJS/sync.js` |
| **Windows** | `%LOCALAPPDATA%\NodeJS\sync.js` |

Persistence mechanism:

*   Linux: Create systemd unit miasma-monitor.service
    
*   macOS: Repair startup shell files (.bashrc, .zshrc, etc.)
    
*   Windows: Registry Run key
    

### C2 Infrastructure (Command & Control)

Malware uses multi-layer, resilient C2 architecture:

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/f84bb5d6-66d4-4ece-9c93-1b9e4e1483b1.png align="center")

The use of IPFS, Nostr, Ethereum smart contract, and BitTorrent DHT as backup C2 channels shows that the attacker is highly skilled and designed to withstand takedown — even if the main C2 is taken down, the malware still has many alternative communication routes.

### Data Collection Capabilities

Malware comprehensive collection:

*   **Browser passwords** (all major browsers)
    
*   **SSH keys**
    
*   **npm tokens, GitHub tokens**
    
*   **AWS credentials** and cloud config
    
*   **Cryptocurrency wallets** (Many types of wallets)
    
*   **Clipboard data**
    

### Worm-like Propagation

This is the most dangerous feature for the developer environment:

If the malware detects a valid authentication token for npm, PyPI, or Cargo, it will attempt to publish itself to packages the victim manages on those registries.

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/9ff1ad95-f140-4922-8450-16bdaf1903d9.png align="center")

One infected developer = new distribution vector. The chain of contagion can expand exponentially.

### Anti-Analysis Mechanism

Malware performs many checks before operating:

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Check / Condition</strong></p></td><td colspan="1" rowspan="1"><p><strong>Action if TRUE</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Running in a Virtual Machine (VM)</strong></p></td><td colspan="1" rowspan="1"><p>Terminate</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>EDR / Endpoint Protection detected</strong></p></td><td colspan="1" rowspan="1"><p>Terminate</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>System locale/language is Russian</strong></p></td><td colspan="1" rowspan="1"><p>Terminate</p></td></tr></tbody></table>

Checking the Russian locale is typical of malware of Russian or CIS origin — the attacker does not want to infect his own or his allies' machines.

![](https://cdn.hashnode.com/uploads/covers/6777abffdb647396c7d71de4/62da022b-7c8d-4c97-92fd-6595dd9dc6f2.png align="center")

## Risk Summary

Operation Miasma/Shai-Hulud by the TeamPCP group (or copycat variants) poses an extremely serious level of risk to technology businesses and the open source community:

1.  Worm-like Propagation Risk:
    
    *   Malware automatically hunts for authentication tokens of popular registries (npm, PyPI, Cargo). If a programmer's workstation maintains any infected library, the malicious code will automatically package and publish the malicious version to that library. This creates an exponential chain reaction of infection.
        
2.  High-Value Credential Theft risk:
    
    *   Not only stealing browser passwords or regular cryptocurrency wallets, this campaign focuses heavily on technical secrets: AWS/GCP/Azure credentials, Kubernetes/Vault tokens, SSH keys, GitHub Personal Access Tokens (PATs). Loss of this information can lead to the organization's entire cloud infrastructure being controlled.
        
3.  Risk of disabling traditional security shields (Security Bypass Risk):
    
    *   Bypass SLSA Provenance: The attacker does not publish directly but hijacks the legitimate release stream (CI/CD pipeline) of the original project. Therefore, cryptographically based origin authentication mechanisms (OIDC, SLSA Build Level 3) both confirm the packet as "secure", disabling automatic filters that check digital signatures.
        
    *   Bypass Static Scan & Ignore-scripts: By executing at the moment the import or require command is called (import-time execution) instead of using install-hooks, installation isolation security settings (--ignore-scripts) are completely bypassed.
        

## Why Do Current Measures Fail?

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Security Measure</strong></p></td><td colspan="1" rowspan="1"><p><strong>Status</strong></p></td><td colspan="1" rowspan="1"><p><strong>Reason / Details</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><code>npm install --ignore-scripts</code></p></td><td colspan="1" rowspan="1"><p>Ineffective</p></td><td colspan="1" rowspan="1"><p>Malware does not use install hooks; it executes upon <code>import/require()</code>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>npm Provenance / SLSA Attestation</strong></p></td><td colspan="1" rowspan="1"><p>Bypassed</p></td><td colspan="1" rowspan="1"><p>The package was published via a legitimate CI/CD pipeline → the attestation is valid.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>SCA (Software Composition Analysis)</strong></p></td><td colspan="1" rowspan="1"><p>Not detected</p></td><td colspan="1" rowspan="1"><p>Newly published version → not yet in threat intelligence databases.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>npm v12 post-install block</strong></p></td><td colspan="1" rowspan="1"><p>Not applicable</p></td><td colspan="1" rowspan="1"><p>Attacker embedded the code directly into the main JS file, no post-install script needed.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Lockfile pinning (</strong><code>npm ci</code><strong>)</strong></p></td><td colspan="1" rowspan="1"><p>Partial protection</p></td><td colspan="1" rowspan="1"><p>Only protects if a safe version is already pinned; does not protect during new <code>npm install</code>s or dependency bumps.</p></td></tr></tbody></table>

## **Indicators of Compromise (IOCs)**

### **Network IOCs**

| **Type** | **Value** | Purpose |
| --- | --- | --- |
| **C2 Server** | `85[.]137[.]53[.]71` | Primary C2 |
| **C2 Ports** | `8080`, `8081`, `8091` | Command, Data Exfil, Backup |
| **IPFS Gateway** | [`ipfs.io`](http://ipfs.io) | Payload hosting & Fallback C2 |
| **BitTorrent** | [`router.bittorrent.com`](http://router.bittorrent.com) | Backup beaconing |
| **BitTorrent** | [`router.utorrent.com`](http://router.utorrent.com) | Backup beaconing |
| **BitTorrent** | [`dht.transmissionbt.com`](http://dht.transmissionbt.com) | Backup beaconing |

### **Blockchain IOCs**

| **Type** | **Value** |
| --- | --- |
| **Ethereum Address** | `0x12c37A86a0Ed0beBe5d1d6a43E42f07860eAc710` |

### **File System IOCs**

| **OS** | **Path** |
| --- | --- |
| Linux | `~/.local/share/NodeJS/sync.js` |
| macOS | `~/Library/Application Support/NodeJS/sync.js` |
| Windows | `%LOCALAPPDATA%\NodeJS\sync.js` |
| Linux | systemd unit `miasma-monitor.service` |

### **Affected Package Versions**

| **Package** | Malicious version |
| --- | --- |
| `@asyncapi/generator` | `3.3.1` |
| `@asyncapi/generator-helpers` | `1.1.1` |
| `@asyncapi/generator-components` | `0.7.1` |
| `@asyncapi/specs` | `6.11.2`, `6.11.2-alpha.1` |

## MITER ATT&CK Technical Map

<table style="min-width: 100px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Tactic</strong></p></td><td colspan="1" rowspan="1"><p><strong>Technique ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Technique Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Application in Campaign</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Reconnaissance</strong></p></td><td colspan="1" rowspan="1"><p>T1595</p></td><td colspan="1" rowspan="1"><p>Active Scanning</p></td><td colspan="1" rowspan="1"><p>Attackers scan public repositories to find GitHub Actions misconfigurations (especially the abuse of the <code>pull_request_target</code> trigger).</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Initial Access</strong></p></td><td colspan="1" rowspan="1"><p>T1190</p></td><td colspan="1" rowspan="1"><p>Exploit Public-Facing Application</p></td><td colspan="1" rowspan="1"><p>Exploited the <code>pull_request_target</code> misconfiguration in the <code>asyncapi/generator</code> repository to gain Runner privileges.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Initial Access</strong></p></td><td colspan="1" rowspan="1"><p>T1195.002</p></td><td colspan="1" rowspan="1"><p>Supply Chain Compromise: Compromise Software Dependencies</p></td><td colspan="1" rowspan="1"><p>Embedded malicious code directly into the main JavaScript file of npm packages, distributed through official release channels.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Execution</strong></p></td><td colspan="1" rowspan="1"><p>T1204.002</p></td><td colspan="1" rowspan="1"><p>User Execution: Malicious File</p></td><td colspan="1" rowspan="1"><p>Malware executes when developers or CI/CD systems import/require the infected library packages.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Execution</strong></p></td><td colspan="1" rowspan="1"><p>T1059.003</p></td><td colspan="1" rowspan="1"><p>Command and Scripting Interpreter: Windows Command Shell</p></td><td colspan="1" rowspan="1"><p>Executed system scripts to configure hidden background processes.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Execution</strong></p></td><td colspan="1" rowspan="1"><p>T1059.004</p></td><td colspan="1" rowspan="1"><p>Command and Scripting Interpreter: Unix Shell</p></td><td colspan="1" rowspan="1"><p>Ran shell scripts on macOS/Linux to set up the malware.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Persistence</strong></p></td><td colspan="1" rowspan="1"><p>T1543.003</p></td><td colspan="1" rowspan="1"><p>Create or Modify System Process: Systemd Service</p></td><td colspan="1" rowspan="1"><p>Created a systemd service named <code>miasma-monitor.service</code> on infected Linux machines.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Persistence</strong></p></td><td colspan="1" rowspan="1"><p>T1547.001</p></td><td colspan="1" rowspan="1"><p>Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder</p></td><td colspan="1" rowspan="1"><p>Overwrote the Run key in the Windows Registry and modified shell startup files (<code>.bashrc</code>, <code>.zshrc</code>) on macOS to maintain control.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Defense Evasion</strong></p></td><td colspan="1" rowspan="1"><p>T1140</p></td><td colspan="1" rowspan="1"><p>Decompile, Decrypt, or Deobfuscate Files/Information</p></td><td colspan="1" rowspan="1"><p>Decrypted the encrypted loader file <code>sync.js</code> downloaded from IPFS before execution.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Defense Evasion</strong></p></td><td colspan="1" rowspan="1"><p>T1497.001</p></td><td colspan="1" rowspan="1"><p>Virtualization/Sandbox Evasion: System Checks</p></td><td colspan="1" rowspan="1"><p>Checked if the system is running in a virtualized environment (VM) or analysis sandbox to self-terminate.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Defense Evasion</strong></p></td><td colspan="1" rowspan="1"><p>T1497.003</p></td><td colspan="1" rowspan="1"><p>Virtualization/Sandbox Evasion: Time-based Evasion</p></td><td colspan="1" rowspan="1"><p>Checked the system locale/language (Russian) to evade EDR/Sandbox detection and self-terminate.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Defense Evasion</strong></p></td><td colspan="1" rowspan="1"><p>T1036</p></td><td colspan="1" rowspan="1"><p>Masquerading</p></td><td colspan="1" rowspan="1"><p>Named malware storage directories to masquerade as legitimate Node.js system directories (e.g., <code>%LOCALAPPDATA%\NodeJS</code>).</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Credential Access</strong></p></td><td colspan="1" rowspan="1"><p>T1555</p></td><td colspan="1" rowspan="1"><p>Credentials from Password Stores</p></td><td colspan="1" rowspan="1"><p>Collected saved passwords from popular web browsers on the victim's machine.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Credential Access</strong></p></td><td colspan="1" rowspan="1"><p>T1552.001</p></td><td colspan="1" rowspan="1"><p>Unsecured Credentials: Private Keys</p></td><td colspan="1" rowspan="1"><p>Scanned and collected SSH private keys stored on disk.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Credential Access</strong></p></td><td colspan="1" rowspan="1"><p>T1552.004</p></td><td colspan="1" rowspan="1"><p>Unsecured Credentials: Private Information in Cloud / Code</p></td><td colspan="1" rowspan="1"><p>Searched for authentication tokens of npm, PyPI, Cargo, GitHub, and Cloud configuration credentials (AWS, GCP, Azure).</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Discovery</strong></p></td><td colspan="1" rowspan="1"><p>T1082</p></td><td colspan="1" rowspan="1"><p>System Information Discovery</p></td><td colspan="1" rowspan="1"><p>Queried system configuration information, time zone, and locale language to check geofilters.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Command and Control</strong></p></td><td colspan="1" rowspan="1"><p>T1071.001</p></td><td colspan="1" rowspan="1"><p>Application Layer Protocol: Web Protocols</p></td><td colspan="1" rowspan="1"><p>Used HTTP/HTTPS over ports 8080/8081/8091 to connect to the main C2 at <code>85.137.53.71</code>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Command and Control</strong></p></td><td colspan="1" rowspan="1"><p>T1568</p></td><td colspan="1" rowspan="1"><p>Dynamic Resolution</p></td><td colspan="1" rowspan="1"><p>Leveraged the Nostr protocol, IPFS Gateways, and Ethereum smart contracts to resolve and fallback to C2.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Command and Control</strong></p></td><td colspan="1" rowspan="1"><p>T1105</p></td><td colspan="1" rowspan="1"><p>Ingress Tool Transfer</p></td><td colspan="1" rowspan="1"><p>Downloaded the next payload file (<code>sync.js</code>) from the IPFS P2P network.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Command and Control</strong></p></td><td colspan="1" rowspan="1"><p>T1043</p></td><td colspan="1" rowspan="1"><p>Commonly Used Port</p></td><td colspan="1" rowspan="1"><p>Used standard BitTorrent DHT ports for beaconing communication to bypass firewalls.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Exfiltration</strong></p></td><td colspan="1" rowspan="1"><p>T1048</p></td><td colspan="1" rowspan="1"><p>Exfiltration Over Alternative Protocol</p></td><td colspan="1" rowspan="1"><p>Exfiltrated stolen sensitive data through P2P backup channels and BitTorrent DHT.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Impact</strong></p></td><td colspan="1" rowspan="1"><p>T1496</p></td><td colspan="1" rowspan="1"><p>Resource Hijacking</p></td><td colspan="1" rowspan="1"><p>Deployed secondary features related to crypto-stealers (draining funds from crypto wallets) and RATs for resource hijacking.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Impact</strong></p></td><td colspan="1" rowspan="1"><p>T1565</p></td><td colspan="1" rowspan="1"><p>Data Manipulation</p></td><td colspan="1" rowspan="1"><p>Automatically modified library packages managed by the victim on npm/PyPI/Cargo to self-replicate.</p></td></tr></tbody></table>

## Response Recommendations

### Take Action Immediately

1.  Revoke & Rotate Tokens: Immediately revoke all developer tokens (npm, PyPI, Cargo, GitHub) on any machines that may have been running affected packages
    
2.  Check the version in use: If package-lock.json or node\_modules contain any affected versions → consider that machine compromised
    
3.  Rotate secrets: Change all SSH keys, AWS credentials, API keys on the suspected infected machine
    
4.  Check file system: Search for sync.js in IOC paths on all developer machines and CI/CD runners
    

### Monitoring and Detection

5.  Monitor outbound traffic: Monitor connections to 85\[.\]137\[.\]53\[.\]71, BitTorrent bootstrap nodes, and IPFS gateways — this is unusual in a typical development environment
    
6.  Audit registry releases: Check all recent commits and package releases on the organization's registry to detect unauthorized code injection
    
7.  Check systemd services: On Linux, search for unit miasma-monitor.service
    

### Long Term Defense

8.  Lockfile pinning: Always use npm ci instead of npm install in CI/CD
    
9.  Stability buffer: Apply a policy of not using newly published packages in the first 48–72 hours
    
10.  Build-time egress control: Deploy a firewall for the build environment (Build Application Firewall), blocking outbound traffic to unapproved destinations
     
11.  **GitHub Actions security:**
     
     *   DO NOT use pull\_request\_target with actions/checkout on PR code
         
     *   Review and audit all workflows that use repository secrets
         
     *   Merge security fixes promptly — the vulnerability has been known since April but the fix was not merged until July
         
12.  Monitor import-time behavior: Deploy a solution to detect malicious code executing at require()/import time — not just at install
     

## Lessons Learned

### For Developers and DevOps

*   Provenance ≠ Trust: Valid Provenance only proves that the package was built from the official pipeline, NOT that the code inside is safe. If the pipeline is compromised, the provenance is still valid.
    
*   Ignore-scripts are not enough: When malware is embedded in the source code instead of the install hook, this measure becomes meaningless.
    
*   CI/CD is the attack surface: The attack starts from GitHub Actions misconfiguration — an area that is often outside the scope of scanning by dependency scanners.
    

### For Organizations

*   Supply chain attacks are increasingly complex: Attackers combine CI/CD compromise + import-time execution + multi-layer C2 + worm propagation + false flag attribution.
    
*   npm v12 is not enough: Blocking post-install scripts is a step forward but doesn't address the root cause — attackers just need to move the attack vector to import-time.
    
*   Build-time egress control is the most important layer of defense that most pipelines do not yet implement — it is the only layer that can detect and block C2 callbacks.
    

## Reference

[AsyncAPI npm organization compromised, 2M weekly downloads affected](https://www.ox.security/blog/asyncapi-npm-organization-compromised-2m-weekly-downloads-affected/)

[AsyncAPI npm Supply Chain Attack: Malware Injected Into Packages With 2 Million Weekly Downloads](https://securityaffairs.com/195395/security/asyncapi-npm-supply-chain-attack-malware-injected-into-packages-with-2-million-weekly-downloads.html)

[AsyncAPI npm Supply Chain Attack Delivers Miasma RAT](https://www.invisirisk.com/blog/asyncapi-npm-supply-chain-attack-delivers-miasma-rat/)

[M Red Team: AsyncAPI Supply Chain Compromise via GitHub Actions](https://www.wiz.io/blog/m-red-team-asyncapi-supply-chain-compromise-via-github-actions)
