Skip to content

BuildNot yet confirmed elsewhere1 publisher3 min readPublished Updated

A comment-triggered Actions workflow published ten malicious npm versions with valid provenance

Socket says all ten bad tarballs of @7nohe/openapi-react-query-codegen carry genuine GitHub Actions attestations, which is what you get when the attestation covers where a build ran rather than who wrote the commit it built.

The Engineer · Build desk

How we use AISend a correction

Photograph accompanying A comment-triggered Actions workflow published ten malicious npm versions with valid provenance
Photo: socket.dev

What happened

  • Socket's research team reports ten malicious versions of the npm package @7nohe/openapi-react-query-codegen published on August 28, 2026, in two waves about twenty minutes apart, covering every maintained release line.
  • Every one of the ten versions carries a valid npm provenance attestation issued through GitHub Actions trusted publishing.
  • All ten remained installable when Socket published, with the latest tag resolving to the malicious 3.0.4, so a plain npm install fetched a compromised build.

Why it matters

  • constraint An install policy that admits packages because they carry attestations admits all ten of these, so provenance presence cannot serve as the gate it is often configured to be.
  • exposure CI runners are reachable here without any suspicious lifecycle script in the manifest, because node-gyp reads binding.gyp during install and that was the only wave-1 trigger.
  • decision Teams on this dependency cannot resolve it by moving forward; each service has to be downgraded to the known-good release for its own line and re-locked.
  • precedent Any repository with a publish job wired to comment events on fork pull requests is now a candidate for the same abuse, and the resulting artifacts will look legitimate to consumers.

Trusted publishing swaps a long-lived npm token for a short-lived OIDC credential the workflow receives at run time. The attestation that comes out the far end can say that a run in that repository produced this tarball. It cannot say anything about the diff that run compiled. Socket reports the publish job could be invoked by a comment from an untrusted GitHub account, checking out code from a fork pull request and publishing it under the repository's trusted publishing identity [5]. Point that job at attacker code and the signature it produces is perfectly truthful about a build nobody asked for.

The execution paths are worth reading in order. Wave-1 versions run only through `binding.gyp`, which is identical across them and uses an obfuscated Python expression to reach `os.system` and launch `node 3FWCvzduYZg.js`; because node-gyp processes that file during installation, it fires on `npm install` in developer environments and CI runners [8]. So a reviewer diffing `package.json` between 0.5.3 and 0.5.4 sees no lifecycle script and nothing to object to. Wave-2 manifests keep the same `binding.gyp` and add `"preinstall": "node 3FWCvzduYZg.js"` on top, a second way in [9].

The loader itself is about 5.7 MB, obfuscated with a single-byte XOR, and decrypts an embedded AES-128-GCM payload that it writes to a random filename in the temp directory, executes via `child_process.execSync`, and unlinks in a `finally` block [6]. A 5.7 MB blob in a code generator's tarball is not subtle, but nobody reads tarballs. The `finally` matters more than the encryption: the artifact is removed whether or not the child process succeeded, so a responder who arrives late finds an empty temp directory. Socket decrypted the second stage and reports it targets cloud credentials, package registry credentials, GitHub Actions secrets and AI agent configuration, and carries self-propagation [7].

Cleanup is not one pin. Of the ten published versions, eight are two consecutive releases on each of four maintained lines, plus two `0.0.0-<commit hash>` prereleases [13]. The last known-good release on each line is exactly one patch below the first malicious one there, so 0.5.3, 1.6.2, 2.2.0 and 3.0.2 are four separate downgrades depending on which line a given service is on [14]. Meanwhile the `latest` tag still resolved to 3.0.4 at the time of writing [3].

Provenance is good engineering for the thing it was built for, which is binding an artifact to a build log you can go read. What would have to be true for a valid attestation to also function as a trust gate is that the set of people who can trigger the attested build equals the set of people you trust to write the code. Socket says that is not the case here [5]. The number I cannot get from this report is exposure: 150,000 weekly downloads across all versions [2] tells you nothing about how many resolved to the ten bad ones in the window before detection.

What to watch

  • Whether npm removes or deprecates the ten versions and moves the latest tag off 3.0.4.
  • Socket's promised follow-on analysis of persistence mechanisms and the true scope of the self-propagation.
  • Whether GitHub or npm restricts attestation issuance for builds triggered by comment events on fork pull requests.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence66
Adoption58
Hype gap+10
Incentives72
Confidence57
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    Socket's Threat Research Team reports that ten malicious versions of the npm package @7nohe/openapi-react-query-codegen were published on August 28, 2026, in two waves roughly twenty minutes apart, spanning every maintained release line.

    ReportedSupportedSource: Socket Threat Research TeamView cited source
  2. [2]

    The package @7nohe/openapi-react-query-codegen receives roughly 150,000 weekly downloads across all versions.

    ReportedSupportedView cited source
  3. [3]

    At the time of writing all ten malicious versions remained installable and the latest tag still resolved to the malicious version 3.0.4, so a plain npm install of the package retrieved a compromised build.

    ReportedSupportedView cited source

Sources

1 independent publisher whose own reporting we read for this story.

  1. socket.dev

    1 article · August 28, 2026

    OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories