M-Red-Team: AsyncAPI Supply Chain Compromise via GitHub Actions
A misconfigured GitHub Actions workflow using pull_request_target checked out attacker-controlled code, allowing a malicious pull request to steal a privileged Personal Access Token. The attacker used the token to publish malicious npm packages under the @asyncapi namespace, which execute a multi-stage payload on import to steal credentials and establish persistence.
Published on wiz.io
On July 14, 2026, an attacker opened 37 pull requests to the AsyncAPI generator repository. Almost all attempted to add a fake charity donation page.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The workflow used pull_request_target, which runs with base repository secrets, but then checked out and executed code from the untrusted pull request.
Impact
The attacker could steal developer credentials and secrets from infected systems, and the malicious packages could execute on import to establish persistence and connect to command and control infrastructure.
What the attacker needed
Attacker can open a pull request; workflow uses pull_request_target and checks out PR code; workflow has access to secrets
How it was found
- Attacker opened a pull request containing a markdown file with obfuscated JavaScript hidden after whitespace.
- The workflow triggered by pull_request_target checked out the attacker's code and executed it.
- The payload scanned the runner environment for secrets and exfiltrated them to a dead-drop URL.
- The attacker retrieved the stolen credentials, including a PAT for a service account.
- Using the PAT, the attacker pushed a malicious commit to the next branch, triggering the release workflow to publish compromised packages.
- The attacker also pushed commits to another repository to publish additional malicious versions.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A GitHub Actions workflow is an automated script that runs when something happens in a repository, like a pull request. The workflow was set up to run with access to secret tokens but also ran code from the pull request, so an attacker could make the workflow leak those secrets. With the stolen token, the attacker published malicious versions of widely used software packages, which then infected anyone who installed them.