{"incident":{"slug":"asyncapi-jul-2026-miasma-oidc-npm","caseId":"BI-2026-033","organization":"AsyncAPI","title":"AsyncAPI: an AI PR spam storm masked a pwn request and shipped import-time malware through OIDC","shortSummary":"On July 14, 2026, attackers flooded asyncapi/generator with fake PRs to hide exploit PR #2155, stole asyncapi-bot admin credentials, and pushed five npm versions executing M-RED-TEAM malware at import time.","lede":"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.","incidentDate":"Jul 14, 2026","incidentDateIso":"2026-07-14","disclosedDate":"Jul 21, 2026","sourceUrl":"https://www.asyncapi.com/blog/miasma-supply-chain-attck","sourceAuthor":"AsyncAPI Security Team (Florence Njeri) and Generator Issue","vectorFilter":"CI supply chain","timeToDetect":"24 min to notice spam (4h 20m npm exposure, 06:58–11:18 UTC)","detectedBy":"AsyncAPI maintainers, LidorMachluf (Issue","initialAccess":{"label":"PR spam cover + pull_request_target pwn request","detail":"Automated PR flood masked exploit PR","evidence":"confirmed"},"blastRadius":"5 npm package versions across 4 @asyncapi packages (4h 20m live, CVSS 9.8)","whatItReachedShort":"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)","whatHeldShort":"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","revisions":[{"id":"Rev A","date":"Jul 21, 2026","note":"Published from AsyncAPI’s July 21, 2026 official UTC forensic postmortem (asyncapi.com/blog/miasma-supply-chain-attck) and Generator Issue #2184."}],"bodyMarkdown":"## How they got in\n\nBy 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.\n\nAt 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.\n\n## What it reached\n\nEven 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**.\n\nAt 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.\n\n## What held\n\nTeams 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.\n\n> **Why this matters for defenders**\n>\n> Disabling `postinstall` scripts and turning on OIDC Trusted Publishing are necessary, not sufficient. Import-time payloads run the second your code imports the library, and an org-wide admin bot lets one unmerged `pull_request_target` fix poison unrelated repos with legitimate CI signatures. Scope automation bots to single repositories and enforce a 48–72 hour dependency cooldown on fresh registry releases.","narrative":{"howTheyGotIn":["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."],"whatItReached":["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."],"whatHeld":["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."],"sideNoteTitle":"Why this matters for defenders","sideNoteParagraphs":["Disabling `postinstall` scripts and turning on OIDC Trusted Publishing are necessary, not sufficient. Import-time payloads run the second your code imports the library, and an org-wide admin bot lets one unmerged `pull_request_target` fix poison unrelated repos with legitimate CI signatures. Scope automation bots to single repositories and enforce a 48–72 hour dependency cooldown on fresh registry releases."]},"claims":[{"group":"How they got in","claim":"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","evidence":"confirmed","source":"AsyncAPI Forensic Postmortem, Jul 21, 2026"},{"group":"What it reached","claim":"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","evidence":"confirmed","source":"AsyncAPI Forensic Postmortem, Jul 21, 2026"},{"group":"What it reached","claim":"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)","evidence":"confirmed","source":"AsyncAPI Forensic Postmortem, Jul 21, 2026"},{"group":"What held","claim":"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","evidence":"confirmed","source":"AsyncAPI Forensic Postmortem and Generator Issue"}],"diagram":{"label":"How an AI PR spam flood masked a pull_request_target exploit in AsyncAPI and abused OIDC Trusted Publishing","zones":[{"id":"ext","label":"PR spam & exploit PR","kind":"boundary","lane":0},{"id":"ci","label":"AsyncAPI GitHub & OIDC","kind":"boundary","lane":1},{"id":"npm","label":"npm runtime execution","kind":"boundary","lane":2},{"id":"safe","label":"Pinned prior versions","kind":"isolated","lane":2}],"nodes":[{"id":"aa-spam","zone":"ext","name":"AI PR spam + PR","detail":"05:04–05:08 UTC decoy","kind":"attacker","ev":"confirmed","at":0,"when":"Jul 14, 05:04 UTC","steps":[1],"ctl":["aa-k1"],"story":"At 05:04 UTC, rotating throwaway accounts flooded asyncapi/generator with duplicate AI spam PRs to bury the actual exploit pull request (PR #2155) opened at 05:08 UTC."},{"id":"aa-bot","zone":"ci","name":"asyncapi-bot admin token","detail":"Run 29307859879 pwn req","kind":"compromised","ev":"confirmed","at":1,"when":"Jul 14, 05:16 UTC","steps":[1,2],"ctl":["aa-k2"],"story":"At 05:16 UTC, PR #2155 triggered an unpatched pull_request_target workflow (already flagged in open PR #2092), exfiltrating org-wide admin credentials for asyncapi-bot."},{"id":"aa-oidc","zone":"ci","name":"OIDC release pipelines","detail":"2 repos, 5 npm builds","kind":"compromised","ev":"confirmed","at":2,"when":"Jul 14, 06:58–08:30 UTC","steps":[2,3],"ctl":["aa-k3"],"story":"The attacker pushed obfuscated malware into validator.js (generator) and index.js padded 700 spaces off-screen (spec-json-schemas), triggering official OIDC Trusted Publishing for 5 npm versions."},{"id":"aa-imp","zone":"npm","name":"Import-time M-RED-TEAM","detail":"Bypasses ignore-scripts","kind":"compromised","ev":"confirmed","at":3,"when":"Jul 14, 06:58–11:18 UTC","steps":[3],"story":"Instead of a postinstall hook, the M-RED-TEAM dropper executed immediately on require() or import, bypassing --ignore-scripts until npm purged all 5 versions at 11:18 UTC."},{"id":"aa-safe","zone":"safe","name":"Pinned lockfiles","detail":"3.3.0 & 6.11.1 clean","kind":"isolated","ev":"confirmed","at":0,"when":"Not reached","story":"Projects pinned to prior versions (@asyncapi/generator@3.3.0, @asyncapi/specs@6.11.1) or enforcing release-age cooldowns avoided the 4-hour 20-minute exposure window entirely."}],"edges":[{"id":"aae1","from":"aa-spam","to":"aa-bot","kind":"attack","step":1},{"id":"aae2","from":"aa-bot","to":"aa-oidc","kind":"attack","step":2},{"id":"aae3","from":"aa-oidc","to":"aa-imp","kind":"attack","step":3}],"steps":[{"n":1,"time":"Jul 14, 05:04–05:16 UTC","short":"05:04–05:16 UTC","text":"PR spam storm masks PR","say":"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."},{"n":2,"time":"Jul 14, 06:58–08:30 UTC","short":"06:58–08:30 UTC","text":"Rogue pushes trigger OIDC Trusted Publishing across generator and spec-json-schemas","say":"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."},{"n":3,"time":"Jul 14, 08:40–11:18 UTC","short":"11:18 UTC purge","text":"Import-time payload bypasses ignore-scripts until bot revocation and npm purge","say":"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)."}],"controls":[{"id":"aa-k1","step":1,"kind":"control","nodeId":"aa-spam","name":"Merge pwn-request fixes","tag":"Stops step 1","long":"Treat open pull_request_target security PRs as urgent P0 fixes and require maintainer approval before running any workflow on untrusted external PRs."},{"id":"aa-k2","step":2,"kind":"control","nodeId":"aa-bot","name":"Scope bot per repository","tag":"Stops step 2","long":"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."},{"id":"aa-k3","step":3,"kind":"control","nodeId":"aa-oidc","name":"Add release-age cooldown","tag":"Stops step 3","long":"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."}],"detectedAt":{"time":"Jul 14, 2026 (05:28 UTC spam noticed; 11:18 UTC npm purge complete)","short":"Jul 14 (4h 20m)","text":"Maintainers noticed the spam flood within 24 minutes, located PR #2155 by 06:09 UTC, stripped asyncapi-bot at 08:40 UTC, and completed npm removal of all 5 versions by 11:18 UTC."}},"plate":{"W":821,"H":380,"label":"How an AI PR spam flood masked a pull_request_target exploit in AsyncAPI and abused OIDC Trusted Publishing","zones":[{"id":"ext","label":"PR spam & exploit PR","kind":"boundary","x":8,"y":16,"w":210,"h":110},{"id":"ci","label":"AsyncAPI GitHub & OIDC","kind":"boundary","x":256,"y":16,"w":258,"h":212},{"id":"npm","label":"npm runtime execution","kind":"boundary","x":552,"y":16,"w":261,"h":110},{"id":"safe","label":"Pinned prior versions","kind":"isolated","x":552,"y":146,"w":261,"h":110}],"nodes":[{"id":"aa-spam","name":"AI PR spam + PR","detail":"05:04–05:08 UTC decoy","kind":"attacker","ev":"confirmed","x":20,"y":52,"w":186,"at":0,"story":"At 05:04 UTC, rotating throwaway accounts flooded asyncapi/generator with duplicate AI spam PRs to bury the actual exploit pull request (PR #2155) opened at 05:08 UTC.","when":"Jul 14, 05:04 UTC","steps":[1],"ctl":["aa-k1"]},{"id":"aa-bot","name":"asyncapi-bot admin token","detail":"Run 29307859879 pwn req","kind":"compromised","ev":"confirmed","x":268,"y":52,"w":234,"at":1,"story":"At 05:16 UTC, PR #2155 triggered an unpatched pull_request_target workflow (already flagged in open PR #2092), exfiltrating org-wide admin credentials for asyncapi-bot.","when":"Jul 14, 05:16 UTC","steps":[1,2],"ctl":["aa-k2"]},{"id":"aa-oidc","name":"OIDC release pipelines","detail":"2 repos, 5 npm builds","kind":"compromised","ev":"confirmed","x":268,"y":154,"w":234,"at":2,"story":"The attacker pushed obfuscated malware into validator.js (generator) and index.js padded 700 spaces off-screen (spec-json-schemas), triggering official OIDC Trusted Publishing for 5 npm versions.","when":"Jul 14, 06:58–08:30 UTC","steps":[2,3],"ctl":["aa-k3"]},{"id":"aa-imp","name":"Import-time M-RED-TEAM","detail":"Bypasses ignore-scripts","kind":"compromised","ev":"confirmed","x":564,"y":52,"w":237,"at":3,"story":"Instead of a postinstall hook, the M-RED-TEAM dropper executed immediately on require() or import, bypassing --ignore-scripts until npm purged all 5 versions at 11:18 UTC.","when":"Jul 14, 06:58–11:18 UTC","steps":[3]},{"id":"aa-safe","name":"Pinned lockfiles","detail":"3.3.0 & 6.11.1 clean","kind":"isolated","ev":"confirmed","x":592,"y":182,"w":168,"at":0,"story":"Projects pinned to prior versions (@asyncapi/generator@3.3.0, @asyncapi/specs@6.11.1) or enforcing release-age cooldowns avoided the 4-hour 20-minute exposure window entirely.","when":"Not reached"}],"edges":[{"id":"aae1","kind":"attack","step":1,"pts":[[206,81],[268,81]]},{"id":"aae2","kind":"attack","step":2,"pts":[[385,110],[385,154]]},{"id":"aae3","kind":"attack","step":3,"pts":[[502,183],[533,183],[533,81],[564,81]]}],"balloons":{"1":[237,81],"2":[385,132],"3":[533,132]},"noroute":[{"x1":514,"x2":552,"y":188,"label":"No route"}],"bps":[{"id":"aa-k1","step":1,"kind":"control","at":[237,81],"name":"Merge pwn-request fixes","tag":"Stops step 1","lead":[[237,70],[237,53],[249,53]],"lx":255,"ly":57,"anchor":"start","long":"Treat open pull_request_target security PRs as urgent P0 fixes and require maintainer approval before running any workflow on untrusted external PRs.","nodeId":"aa-spam"},{"id":"aa-k2","step":2,"kind":"control","at":[385,132],"name":"Scope bot per repository","tag":"Stops step 2","lead":[[385,143],[385,154],[397,154]],"lx":403,"ly":158,"anchor":"start","long":"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.","nodeId":"aa-bot"},{"id":"aa-k3","step":3,"kind":"control","at":[533,132],"name":"Add release-age cooldown","tag":"Stops step 3","lead":[[533,121],[533,104],[545,104]],"lx":551,"ly":108,"anchor":"start","long":"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.","nodeId":"aa-oidc"}],"steps":[{"n":1,"time":"Jul 14, 05:04–05:16 UTC","short":"05:04–05:16 UTC","text":"PR spam storm masks PR","say":"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."},{"n":2,"time":"Jul 14, 06:58–08:30 UTC","short":"06:58–08:30 UTC","text":"Rogue pushes trigger OIDC Trusted Publishing across generator and spec-json-schemas","say":"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."},{"n":3,"time":"Jul 14, 08:40–11:18 UTC","short":"11:18 UTC purge","text":"Import-time payload bypasses ignore-scripts until bot revocation and npm purge","say":"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)."}],"stripRows":[{"id":"sr-aa-spam","nodeId":"aa-spam","lineStyle":"solid"},{"id":"sr-step-1","nodeId":"aa-bot","step":1,"lineStyle":"solid","bpIds":["aa-k1"]},{"id":"sr-step-2","nodeId":"aa-oidc","step":2,"lineStyle":"solid","bpIds":["aa-k2"]},{"id":"sr-step-3","nodeId":"aa-imp","step":3,"lineStyle":"none","bpIds":["aa-k3"]}],"detectedAt":{"time":"Jul 14, 2026 (05:28 UTC spam noticed; 11:18 UTC npm purge complete)","short":"Jul 14 (4h 20m)","text":"Maintainers noticed the spam flood within 24 minutes, located PR #2155 by 06:09 UTC, stripped asyncapi-bot at 08:40 UTC, and completed npm removal of all 5 versions by 11:18 UTC."}},"codeArtifacts":[{"id":"aa-version-check","filename":"check-asyncapi-compromised.sh","language":"sh","description":"Scan JS lockfiles for the 5 compromised AsyncAPI npm versions published July 14, 2026.","code":"#!/usr/bin/env bash\nset -euo pipefail\ngrep -rnE \"@asyncapi/(generator\\\"?:.*3\\.3\\.1|generator-helpers\\\"?:.*1\\.1\\.1|generator-components\\\"?:.*0\\.7\\.1|specs\\\"?:.*6\\.11\\.2)\" \\\n  package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null \\\n  && echo \"ALERT: Compromised July 14 AsyncAPI npm version detected\" \\\n  || echo \"Clean: no compromised AsyncAPI versions found\"\n"}],"reproductionLab":{"title":"AsyncAPI lockfile & cooldown verification","summary":"Verify your workspace lockfiles are free of the five July 14 @asyncapi versions and confirm a minimum release-age cooldown protects against import-time malware.","bundleMeta":"Shell verification script, MIT license","safetyNote":"Read-only lockfile inspection.","commands":"bash check-asyncapi-compromised.sh\n"},"iocs":[{"type":"Package","value":"@asyncapi/generator@3.3.1, generator-helpers@1.1.1, generator-components@0.7.1","note":"Compromised generator packages published at 07:10 UTC through OIDC Trusted Publishing","evidence":"confirmed"},{"type":"Package","value":"@asyncapi/specs@6.11.2-alpha.1, @asyncapi/specs@6.11.2","note":"Lateral-movement specification packages published at 08:06 and 08:30 UTC","evidence":"confirmed"},{"type":"Commit","value":"3eab3ec (validator.js) & 689f5b9669 (index.js)","note":"Malicious commits injecting M-RED-TEAM import-time payload into generator and spec repos","evidence":"confirmed"}],"publishedAt":"2026-07-21T16:00:00Z","origin":"editorial"}}