Poisoned Pipeline / Incidents / AS538
A stolen maintainer credential pushed a counterfeit release workflow onto branches that lived for seconds, and npm's trusted publishing accepted it because the check binds to the workflow's filename rather than the ref, so the packages shipped with the maintainer's identity and a genuine attestation that named the throwaway branch
npmGitHub ActionsGit / GitHubVS Code / IDEAI coding agentsDeveloper workstation
On 1 June 2026 more than thirty @redhat-cloud-services npm packages were
published carrying a credential-stealing worm. StepSecurity, Aikido and
Wiz documented the compromise and its payload; Boost Security Labs
published the analysis of the publish path on the same day, as a live
threat hunt, and that analysis is what this story follows.
A legitimate RedHatInsights maintainer account pushed a small counterfeit
workflow into short-lived branches, named oidc-*, on three repositories.
Each copy matched its repository's real release filename exactly —
ci.yml, ci.yaml, release.yml — and carried the same three settings: it
triggered on a push to any branch, it requested id-token: write, and it
published through npm's OIDC trusted publishing. Nine of the branches
were recovered from the Activity API; they were created and deleted
within one to 73 seconds. The bursts ran from 10:53 UTC and continued,
in pairs about a minute apart across the two main repositories, at
13:44, 14:22, 15:53 and 20:21 UTC. The malicious index.js was
byte-identical at 4,215,480 bytes in every copy; only the package list
changed.
Nothing about the trust chain looked wrong from outside. The packages
were published by the publisher's own account, from the publisher's own
repository, and npm issued a SLSA provenance attestation through Sigstore
for each one. For @redhat-cloud-services/types@3.6.1 the attestation
records the truth: repository RedHatInsights/frontend-components, ref
refs/heads/oidc-61fff775, workflow .github/workflows/ci.yaml, commit
8bf05125. That branch existed for about a second before it was deleted.
The record sits permanently in the public transparency log, and nothing
in the publish path or in the usual consumer check reads the ref.
The reason it worked is the shape of the trusted-publisher binding. npm
configures a trusted publisher by organisation, repository, workflow
filename — the filename only, not the path — and an optional environment
name. At publish it validates the token against those values and not
against the git ref or branch. The only way to constrain the branch is a
GitHub Environment with deployment-branch rules, where npm checks the
environment name and GitHub enforces the branch; javascript-clients
required no environment. PyPI's trusted publishing uses the same fields
with no ref field. A three-minute-old workflow file that happens to be
called ci.yml is therefore a release identity.
Branch protection was not bypassed, because it was not in the way. main
is protected on these repositories, direct pushes are blocked and
changes land through reviewed pull requests, so the stolen credential
could not push a poisoned release there. The legitimate release workflow
on main never ran. The attacker published from a branch instead, where
no review exists to pass.
The published packages carry a preinstall hook that runs an obfuscated
index.js on every npm install. The reports describe a credential-stealing
worm of the Miasma family: it sweeps the developer's ~/.npmrc, tokens and
SSH keys, and uses what it takes to publish into more repositories. npm
has since unpublished the malicious versions outright, so they return
404 today and survive only as registry timestamps and in the
transparency log; each latest tag points back to the last known-good
release. The versions recorded as malicious are compliance-client 4.0.3,
4.0.4 and 4.0.6; config-manager-client 5.0.4, 5.0.5 and 5.0.7;
entitlements-client 4.0.11, 4.0.12 and 4.0.14; host-inventory-client
5.0.3, 5.0.4 and 5.0.6; insights-client 4.0.4, 4.0.5 and 4.0.7;
integrations-client 6.0.4, 6.0.5 and 6.0.7; notifications-client 6.1.4,
6.1.5 and 6.1.7; patch-client 4.0.4, 4.0.5 and 4.0.7;
quickstarts-client 4.0.11, 4.0.12 and 4.0.14; rbac-client 9.0.3, 9.0.4
and 9.0.6; remediations-client 4.0.4, 4.0.5 and 4.0.7;
sources-client 3.0.10, 3.0.11 and 3.0.13; topological-inventory-client
3.0.10, 3.0.11 and 3.0.13; vulnerabilities-client 2.1.8, 2.1.9 and
2.1.11; and javascript-clients-shared 2.0.8, 2.0.9 and 2.0.11.
Partway through the day the same account changed method. It began
pushing commits dressed as routine work — "feat!: ... [skip ci]",
"chore!: updating rbac-client ..." — onto live feature and ticket
branches across the repositories: switch-rbac-new-builder, update,
RHCLOUD-30109, api-info-spec-update, js-clients-bump and others. The
earliest is 15:54 UTC on frontend-components and dropped only a loader,
.github/setup.js. By the final wave, at 20:23-20:24 UTC, the commit
carried a kit that starts the loader three ways: a .claude/settings.json
SessionStart hook that runs node .github/setup.js whenever an agent such
as Claude Code opens a session in the checkout, a .vscode/tasks.json task
with "runOn": "folderOpen" that runs the same script when the folder
opens in VS Code, and the script itself, an obfuscated loader that
decrypts and runs an embedded payload without making a network call.
Because it never touches npm, unpublishing the bad versions does not
reach it: a developer who checks out a poisoned branch and opens it in an
editor or an agent runs the loader locally.
The analysis also dates the activity from the Activity API rather than
from commit authors. The API records the authenticated actor, not the
forgeable commit author, and it attributed every push to the
maintainer's account. In the same bursts the account pushed dozens of the
maintainer's unrelated working branches across other repositories and
planted the same stealer on a fourth package repository, ai-web-clients,
that the earlier public reports omit. Boost's reading is that this is the
signature of automated bulk pushing from a compromised machine, not a
person working by hand: seven branches across four repositories in ten
seconds.
Attribution is to a stolen credential, not to a flaw in the pipeline.
There was no injection and no pwn request. The most plausible entry point
is a developer endpoint that the worm itself is built to mine, and the
evidence for it is circumstantial: the working-branch pushes, the fourth
repository, and the volume within seconds. Whether the credential was a
personal access token, an SSH key or a session is not established, and
Boost is careful that activity continuing for 9.5 hours does not prove a
single credential stayed valid — a rotation in progress can look the same
from outside.
Mapped techniques
- T0113 Compromised user account
- T0153 Compromised developer workstation
- T0284 Publish from an unprotected branch under the release workflow's filename
- T0207 Skip or forge artifact integrity verification
- T0151 Installation scripts
- T0184 Harvesting sensitive information from files
- T0169 Push implants across repositories
- T0195 Spoofed Commits
- T0152 Malicious IDE build configuration
- T0210 Poison AI coding-agent config or workspace
supply-chain A maintainer credential reaches the release path
Every push was server-attributed by the Activity API to a
legitimate RedHatInsights maintainer account, which records the
authenticated actor rather than the commit author. The first
malicious publish is at 10:53 UTC on 1 June; the last observed
push is at 20:24, about 9.5 hours later, which the analysis reads
as a rotation in progress rather than one credential surviving
all day.
Unconfirmed and stated as the leading theory. The worm the
campaign ships sweeps ~/.npmrc, tokens and SSH keys, and the
account pushed dozens of the maintainer's unrelated working
branches and a stealer onto a fourth package repository in the
same bursts — seven branches across four repositories in ten
seconds, which reads as automated bulk pushing of local clones.
No endpoint telemetry is published.
supply-chain A counterfeit workflow on a throwaway branch publishes as the real package
The counterfeit .github/workflows/ci.yml triggered on a push to
any branch and requested id-token: write; npm trusted publishing
validated organisation, repository and workflow filename, not the
ref. Each copy matched the repository's real filename — ci.yml,
ci.yaml, release.yml — and the oidc-* branches it lived on were
recovered nine times, each deleted within one to 73 seconds. main
stayed protected and its real release workflow never ran, so the
control that held was simply not on the path the publish took.
Not forged: genuinely issued and genuinely misleading. The SLSA
attestation npm generated records ref refs/heads/oidc-61fff775
for @redhat-cloud-services/types@3.6.1, in Sigstore's public
transparency log, permanently. "Has provenance from the expected
repository" therefore answers yes, and the field that would have
answered "was this built from a release ref?" is inside the same
document, unread by any check in the path.
supply-chain The published packages run a credential worm at install
A preinstall hook runs an obfuscated 4.2 MB index.js on every npm
install, from a version published by the real maintainer through
the real package name. The file was byte-identical across every
package; only the package list inside it changed.
The worm sweeps the developer machine for ~/.npmrc, package
registry tokens and SSH keys, which is also the reason the
publish path is only half the incident: the same packages that
carry it also arm it against the next maintainer.
Stolen publishing credentials are used to publish the same worm
into further packages. Nothing in the analysis bounds the number
of repositories reached this way; the observed set is the
@redhat-cloud-services packages and the branches pushed from the
same account.
post-supply-chain Poisoned branches run on the developer machine without npm
Commits carried routine-looking messages — "feat!: ... [skip ci]",
"chore!: updating rbac-client ..." — onto live feature and ticket
branches: switch-rbac-new-builder, update, RHCLOUD-30109,
api-info-spec-update, js-clients-bump and others. [skip ci] keeps
the push from starting a pipeline, so the commit lands quietly on
a branch a developer is already working on.
A .vscode/tasks.json task with "runOn": "folderOpen" runs
node .github/setup.js the moment the repository is opened in VS
Code. The same kit ships the loader at .github/setup.js, which
decrypts and runs an embedded payload offline, so egress
filtering on the developer machine does not see it.
A .claude/settings.json SessionStart hook runs the same script
whenever an agent such as Claude Code opens a session in the
checkout. The kit arrived in the 20:23-20:24 UTC wave on both
repositories, and it is the half of the campaign that
unpublishing the npm versions does not touch.
Framework gaps noted
- How the maintainer credential was obtained is not established. The developer-endpoint infostealer is the leading theory, supported by the worm's own file-harvesting behaviour and by the burst pattern, but no endpoint telemetry, token type or first-infection time is published.
- Whether the trusted publisher really had no environment is inferred from behaviour — publishes from arbitrary branches succeeded — not from the registry-side configuration. Boost says so explicitly, and also says it is still correlating which wave shipped which versions.
- Whether any ai-web-clients package was published is unresolved. The analysis found the stealer planted on that repository and says the public reports omit it; it does not claim a release from it.
- The 9.5 hours of activity are not proof that one credential stayed valid. An account being rotated while the attacker holds several credentials of similar value looks the same from outside; no containment timeline is published.
- Victim counts are not published. Downloads during the window, installs from internal mirrors and the number of downstream packages republished with stolen credentials are all unrecorded.
- The worm's later stages are described from the earlier reporting (StepSecurity, Aikido, Wiz) rather than from this analysis, which concentrates on the publish path and the branch poisoning.