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

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.

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.

PR spam & exploit PRAsyncAPI GitHub & OIDCnpm runtime executionStayed safeAI PR spam + PR05:04–05:08 UTC decoyasyncapi-bot admin tokenRun 29307859879 pwn reqOIDC release pipelines2 repos, 5 npm buildsImport-time M-RED-TEAMBypasses ignore-scriptsPinned lockfiles3.3.0 & 6.11.1 clean123
1Jul 14, 05:04–05:16 UTC

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.

ConfirmedWhere to stop it: merge pwn-request fixes
  1. Jul 14, 05:04–05:16 UTC

    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.

    AI PR spam + PRtoasyncapi-bot admin token
  2. Jul 14, 06:58–08:30 UTC

    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.

    asyncapi-bot admin tokentoOIDC release pipelines
  3. Jul 14, 08:40–11:18 UTC

    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).

    OIDC release pipelinestoImport-time M-RED-TEAM

Figure 1. How the attack unfolded, and what stayed isolated. Select any step or box for details.

What they took

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

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

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

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.

check-asyncapi-compromised.sh

Scan JS lockfiles for the 5 compromised AsyncAPI npm versions published July 14, 2026.

#!/usr/bin/env bashset -euo pipefailgrep -rnE "@asyncapi/(generator\"?:.*3\.3\.1|generator-helpers\"?:.*1\.1\.1|generator-components\"?:.*0\.7\.1|specs\"?:.*6\.11\.2)" \  package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null \  && echo "ALERT: Compromised July 14 AsyncAPI npm version detected" \  || echo "Clean: no compromised AsyncAPI versions found"

Appendix

Evidence log: what’s confirmed and what’s withheld4 claims
ClaimStatusSource
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 credentialsConfirmedAsyncAPI Forensic Postmortem, Jul 21, 2026
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.2ConfirmedAsyncAPI Forensic Postmortem, Jul 21, 2026
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)ConfirmedAsyncAPI Forensic Postmortem, Jul 21, 2026
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 unaffectedConfirmedAsyncAPI Forensic Postmortem and Generator Issue
Indicators of compromise3 indicators
  • @asyncapi/generator@3.3.1, generator-helpers@1.1.1, generator-components@0.7.1

  • @asyncapi/specs@6.11.2-alpha.1, @asyncapi/specs@6.11.2

  • 3eab3ec (validator.js) & 689f5b9669 (index.js)

Reproduction labShell verification script, MIT license

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.

Safety note: Read-only lockfile inspection.

bash check-asyncapi-compromised.sh
AsyncAPI: an AI PR spam storm masked a pwn request and shipped import-time malware through OIDC | breachidents