Skip to main content

CVE-2026-46412 — Malicious code in @beproduct/nestjs-auth

CRITICAL

Malicious code in @beproduct/nestjs-auth (0.1.2 through 0.1.19) — Mini Shai-Hulud worm

Published May 19, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.77%). Schedule for your next planned update.

Does your project use an affected @beproduct/nestjs-auth version?

Paste your package-lock.json to check it for CVE-2026-46412 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

Summary

Between 2026-05-11 20:19 UTC and 22:56 UTC, an attacker used a compromised npm publish token to publish 18 malicious versions of @beproduct/nestjs-auth (0.1.2 through 0.1.19). The packages contained payloads from the Mini Shai-Hulud npm supply-chain worm campaign described by Aikido Security.

npm Security removed the malicious versions from the registry shortly after publication, but anyone who ran npm install @beproduct/nestjs-auth resolving to any version in the affected range during that window executed the malicious postinstall script and is potentially compromised.

Version 0.1.20 is a clean republish from the original 0.1.1 source tree.

Impact

The postinstall payload attempted to harvest:

  • npm tokens (from ~/.npmrc)
  • GitHub personal access tokens, OAuth tokens (gho_*), and Actions OIDC tokens
  • AWS credentials (from environment variables and ~/.aws/credentials)
  • HashiCorp Vault tokens
  • Other secrets present in environment variables

Exfiltration target: https://filev2.getsession.org. The worm also wrote persistence artefacts (tanstack_runner.js, router_init.js, setup.mjs, plus IDE-hook configurations in .claude/ and .vscode/) into the developer's working tree where the malicious install ran.

Indicators of compromise

TypeValue
File name (payload)tanstack_runner.js, router_init.js, router_runtime.js
SHA-256 (tanstack_runner.js)2ec78d556d696e208927cc503d48e4b5eb56b31abc2870c2ed2e98d6be27fc96
SHA-256 (router_init.js)ab4fcadaec49c03278063dd269ea5eef82d24f2124a8e15d7b90f2fa8601266c
Exfil endpointfilev2.getsession.org
Cloud metadata probe169.254.169.254/latest/meta-data/iam/security-credentials/
npm token endpointregistry.npmjs.org/-/npm/v1/tokens
Vault probevault.svc.cluster.local:8200
IDE hook pattern.claude/settings.json SessionStart hook + .vscode/tasks.json runOn: "folderOpen" running node .claude/setup.mjs or node .vscode/setup.mjs

Mitigation

If you installed any version in the range >=0.1.2 <=0.1.19:

  1. Remove the package and clean the npm cache:
    npm uninstall @beproduct/nestjs-auth
    npm cache clean --force
    
  2. Install the clean version:
    npm install @beproduct/nestjs-auth@0.1.20
    
  3. Rotate every credential present in the install environment, including:
    • All npm publish tokens (https://www.npmjs.com/settings/<you>/tokens)
    • All GitHub PATs and OAuth tokens (https://github.com/settings/applications + https://github.com/settings/tokens)
    • AWS access keys
    • HashiCorp Vault tokens
    • Any other secret that was in env vars or config files at install time
  4. Scan affected hosts for the indicators of compromise above. If any are found, treat the host as compromised and reimage.
  5. Check committed repository history for unexpected additions in .claude/ or .vscode/ directories — the worm is known to commit setup.mjs + hook configs to PR branches via automated agent runtimes.

Timeline (UTC)

TimeEvent
2026-05-11 20:19:43First malicious version (0.1.2) published
2026-05-11 22:56:39Final malicious version (0.1.19) published — 18 versions in 2h37m
2026-05-12 ~14:12npm Security removes the malicious versions from the registry
2026-05-13BeProduct discovers the incident via Aikido's public disclosure
2026-05-14Compromised npm publish token revoked; BeProduct GitHub OAuth credentials rotated
2026-05-14Clean release 0.1.20 published; this advisory filed

Root cause

The compromised npm publish token was harvested by a Mini-Shai-Hulud-infected transitive dependency in an automated GitHub coding-agent runtime that had read access to the NPM_TOKEN GitHub Actions secret for an unrelated repository under the same npm publisher account. The publish itself was performed by the attacker against the public npm registry; the source repository for this package was not modified by the attacker.

References

Advisory Timeline

  • First published May 19, 2026 (191 days ago).
  • Last revised September 10, 2026 — 113 days after initial publication.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
@beproduct/nestjs-auth npm · Affected: All versionsRange-based data available

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-46412?
Malicious code in @beproduct/nestjs-auth (0.1.2 through 0.1.19) — Mini Shai-Hulud worm. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2026-46412?
CVE-2026-46412 affects @beproduct/nestjs-auth. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-46412 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.77%
EPSS percentile: 51.8

This is an above-median EPSS score — 51.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-6xwp-cp5h-q856

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json