# AsyncAPI: an AI PR spam storm masked a pwn request and shipped import-time malware through OIDC

- **Canonical URL:** https://breachidents.com/incidents/asyncapi-jul-2026-miasma-oidc-npm
- **Organization:** AsyncAPI
- **Incident date:** Jul 14, 2026
- **Disclosed / updated:** Jul 21, 2026
- **Category:** CI supply chain
- **Primary source:** AsyncAPI Security Team (Florence Njeri) and Generator Issue (https://www.asyncapi.com/blog/miasma-supply-chain-attck)

## In 30 seconds

- **How they got in:** Automated PR flood masked exploit PR _[Confirmed]_
- **What leaked / reached:** asyncapi/generator and asyncapi/spec-json-schemas repos, asyncapi-bot org admin token, and 5 npm versions (@asyncapi/generator@3.3.1, generator-helpers@1.1.1, generator-components@0.7.1, @asyncapi/specs@6.11.2-alpha.1 & 6.11.2)
- **What stayed safe:** Prior pinned versions (@asyncapi/generator@3.3.0, specs@6.11.1), builds outside the 06:58–11:18 UTC window, and core maintainers’ personal credentials

## Summary

At 05:04 UTC on July 14, 2026, attackers launched an automated AI pull-request spam storm against asyncapi/generator to bury exploit PR #2155 four minutes later. Exploiting an unmerged pull_request_target bug already flagged in PR #2092, the attacker stole asyncapi-bot’s org-wide admin token, pushed obfuscated code into validator.js and spec-json-schemas’s index.js (padded 700 spaces off-screen), and let official OIDC Trusted Publishing ship five npm versions live for 4 hours and 20 minutes.

## Attack sequence

1. **Jul 14, 05:04–05:16 UTC — PR spam storm masks PR:** Automated spam PRs drown maintainer notifications at 05:04 UTC; four minutes later PR #2155 exploits pull_request_target (Run 29307859879) and steals asyncapi-bot’s org admin token.
2. **Jul 14, 06:58–08:30 UTC — Rogue pushes trigger OIDC Trusted Publishing across generator and spec-json-schemas:** Using asyncapi-bot, the attacker injects obfuscated code into validator.js and 700-space padded index.js, letting official CI publish 5 signed versions to npm across both repos.
3. **Jul 14, 08:40–11:18 UTC — Import-time payload bypasses ignore-scripts until bot revocation and npm purge:** Community alerts on Issue #2184 and Aikido confirm both repos; asyncapi-bot is stripped at 08:40 UTC and npm purges all 5 versions by 11:18 UTC (4h 20m total exposure).

## How they got in

By mid-2026, two standard supply-chain defenses had gone mainstream: disabling `postinstall` scripts (`--ignore-scripts`) and adopting npm OIDC Trusted Publishing. AsyncAPI's July 14, 2026 breach was engineered specifically to walk right past both.

At 05:04 UTC, rotating throwaway accounts unleashed an automated flood of duplicate AI spam pull requests on `asyncapi/generator` to swamp GitHub notifications and CI triage. Four minutes later, at 05:08 UTC, the attacker slipped the real exploit (`PR #2155`) into the flood. At 05:16 UTC, `PR #2155` triggered a legacy `pull_request_target` workflow under Run `29307859879` (exploiting the exact flaw already waiting in unmerged security `PR #2092`), exfiltrated the org-wide administrative credentials of `asyncapi-bot`, closed `PR #2155`, and reset git history to hide the diff.

## What it reached

Even though maintainers caught the spam flood by 05:28 UTC and locked down PR creation to org members at 06:12 UTC, the attacker already held `asyncapi-bot`. At 06:58 UTC, they pushed commit `3eab3ec` to `next`, appending roughly 15,000 characters of obfuscated M-RED-TEAM malware into `validator.js`. Twelve minutes later (`07:10 UTC`), AsyncAPI's own `release-with-changesets.yml` workflow automatically published `@asyncapi/generator@3.3.1`, `@asyncapi/generator-helpers@1.1.1`, and `@asyncapi/generator-components@0.7.1` to npm with completely valid **OIDC Trusted Publishing provenance**.

At 07:51 UTC, the attacker pivoted laterally with the same bot token to `asyncapi/spec-json-schemas`, injecting the dropper into `index.js` padded with roughly 700 leading spaces so it sat off-screen in normal diffs; automated pipelines shipped `@asyncapi/specs@6.11.2-alpha.1` (`08:06 UTC`) and `6.11.2` (`08:30 UTC`). Crucially, the payload lived inside first-party library code and executed the millisecond downstream code called `require()` or `import`, completely defeating `--ignore-scripts`. Maintainers stripped `asyncapi-bot` to read-only at 08:40 UTC and npm purged all five versions by 11:18 UTC, closing a 4-hour 20-minute exposure window.

## What stayed safe

Teams using frozen lockfiles pinned to safe versions (`@asyncapi/generator@3.3.0`, `@asyncapi/specs@6.11.1`) or enforcing a multi-day release-age cooldown before consuming brand-new npm versions sailed right past the 4-hour 20-minute window untouched.

## How to defend against this

- **Merge pwn-request fixes** (Stops step 1): Treat open pull_request_target security PRs as urgent P0 fixes and require maintainer approval before running any workflow on untrusted external PRs.
- **Scope bot per repository** (Stops step 2): Never give a single automation bot org-wide admin rights that bypass branch protection and let an exploit in one repo pivot laterally into unrelated repositories.
- **Add release-age cooldown** (Stops step 3): Because import-time payloads bypass ignore-scripts=true, enforce frozen lockfiles and a 72-hour minimum release-age delay so 4-hour rogue npm versions never reach CI.

## Evidence log

| Section | Claim | Evidence state | Source |
| --- | --- | --- | --- |
| How they got in | At 05:04 UTC on July 14, 2026, an AI PR spam flood masked exploit PR #2155 (05:08 UTC), which exploited an unmerged pull_request_target vulnerability (flagged in PR #2092) under Run 29307859879 to steal asyncapi-bot’s org-wide admin credentials | Confirmed | AsyncAPI Forensic Postmortem, Jul 21, 2026 |
| What it reached | The attacker pushed obfuscated malware to validator.js in asyncapi/generator and to index.js (padded ~700 spaces off-screen) in asyncapi/spec-json-schemas, publishing 5 npm versions with valid OIDC provenance: @asyncapi/generator@3.3.1, @asyncapi/generator-helpers@1.1.1, @asyncapi/generator-components@0.7.1, @asyncapi/specs@6.11.2-alpha.1, and 6.11.2 | Confirmed | AsyncAPI Forensic Postmortem, Jul 21, 2026 |
| What it reached | The M-RED-TEAM payload executed at import time on require() or import (bypassing --ignore-scripts) and stayed live on npm for 4 hours and 20 minutes (06:58 to 11:18 UTC) | Confirmed | AsyncAPI Forensic Postmortem, Jul 21, 2026 |
| What held | Prior pinned versions (@asyncapi/generator@3.3.0, generator-helpers@1.1.0, generator-components@0.7.0, @asyncapi/specs@6.11.1) and pipelines enforcing frozen lockfiles or release-age cooldowns remained unaffected | Confirmed | AsyncAPI Forensic Postmortem and Generator Issue |

## Indicators of compromise

- **Package:** `@asyncapi/generator@3.3.1, generator-helpers@1.1.1, generator-components@0.7.1` (undefined)
- **Package:** `@asyncapi/specs@6.11.2-alpha.1, @asyncapi/specs@6.11.2` (undefined)
- **Commit:** `3eab3ec (validator.js) & 689f5b9669 (index.js)` (undefined)

---
Published by [breachidents](https://breachidents.com). Preserve evidence labels (Confirmed / Inferred / Withheld by vendor / Observed) when citing.
