CVE-2026-46412: @beproduct/nestjs auth Malicious Code Vulnerability
CRITICALCVE-2026-46412 is a CRITICAL (CVSS 10.0) malicious code vulnerability (CWE-506: Embedded Malicious Code) affecting @beproduct/nestjs auth libraries in the npm ecosystem. The issue involves malicious code in @beproduct/nestjs-auth (0.1.2 through 0.1.19) — mini shai-hulud worm. Remediation is available in the latest vendor maintenance releases.
CVE-2026-46412 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-46412
To remediate this vulnerability, upgrade all affected @beproduct/nestjs auth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @beproduct/nestjs-auth@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @beproduct/nestjs-auth
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-46412, inspect your project dependencies using npm:
npm ls @beproduct/nestjs-auth
Analyze the terminal output to locate any version of @beproduct/nestjs auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @beproduct/nestjs-auth command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-506: Embedded Malicious Code, where the product contains code that appears to be malicious in nature. In @beproduct/nestjs auth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-46412 Affected @beproduct/nestjs auth Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@beproduct/nestjs-auth
|
npm |
≥ 0.1.2
≤ 0.1.19
|
|
References
Frequently Asked Questions
What is CVE-2026-46412?
Which @beproduct/nestjs auth versions are affected?
What version fixes CVE-2026-46412?
Is @beproduct/nestjs-auth affected?
What is the CVSS score of CVE-2026-46412?
What CWE is associated with CVE-2026-46412?
How can I check npm dependencies for CVE-2026-46412?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6xwp-cp5h-q856",
"modified" : "2026-05-19T20:28:07Z",
"published" : "2026-05-19T20:28:07Z",
"aliases" : [ "CVE-2026-46412" ],
"summary" : "Malicious code in @beproduct/nestjs-auth (0.1.2 through 0.1.19) — Mini Shai-Hulud worm",
"details" : "## Summary\n\nBetween 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](https://www.aikido.dev/blog/mini-shai-hulud-is-back-tanstack-compromised).\n\nnpm 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.\n\nVersion `0.1.20` is a clean republish from the original `0.1.1` source tree.\n\n## Impact\n\nThe postinstall payload attempted to harvest:\n\n- npm tokens (from `~/.npmrc`)\n- GitHub personal access tokens, OAuth tokens (`gho_*`), and Actions OIDC tokens\n- AWS credentials (from environment variables and `~/.aws/credentials`)\n- HashiCorp Vault tokens\n- Other secrets present in environment variables\n\nExfiltration 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.\n\n## Indicators of compromise\n\n| Type | Value |\n|---|---|\n| File name (payload) | `tanstack_runner.js`, `router_init.js`, `router_runtime.js` |\n| SHA-256 (tanstack_runner.js) | `2ec78d556d696e208927cc503d48e4b5eb56b31abc2870c2ed2e98d6be27fc96` |\n| SHA-256 (router_init.js) | `ab4fcadaec49c03278063dd269ea5eef82d24f2124a8e15d7b90f2fa8601266c` |\n| Exfil endpoint | `filev2.getsession.org` |\n| Cloud metadata probe | `169.254.169.254/latest/meta-data/iam/security-credentials/` |\n| npm token endpoint | `registry.npmjs.org/-/npm/v1/tokens` |\n| Vault probe | `vault.svc.cluster.local:8200` |\n| IDE hook pattern | `.claude/settings.json` `SessionStart` hook + `.vscode/tasks.json` `runOn: \"folderOpen\"` running `node .claude/setup.mjs` or `node .vscode/setup.mjs` |\n\n## Mitigation\n\nIf you installed any version in the range `>=0.1.2 <=0.1.19`:\n\n1. **Remove the package and clean the npm cache:**\n ```bash\n npm uninstall @beproduct/nestjs-auth\n npm cache clean --force\n ```\n2. **Install the clean version:**\n ```bash\n npm install @beproduct/nestjs-auth@0.1.20\n ```\n3. **Rotate every credential present in the install environment**, including:\n - All npm publish tokens (`https://www.npmjs.com/settings/<you>/tokens`)\n - All GitHub PATs and OAuth tokens (`https://github.com/settings/applications` + `https://github.com/settings/tokens`)\n - AWS access keys\n - HashiCorp Vault tokens\n - Any other secret that was in env vars or config files at install time\n4. **Scan affected hosts** for the indicators of compromise above. If any are found, treat the host as compromised and reimage.\n5. **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.\n\n## Timeline (UTC)\n\n| Time | Event |\n|---|---|\n| 2026-05-11 20:19:43 | First malicious version (`0.1.2`) published |\n| 2026-05-11 22:56:39 | Final malicious version (`0.1.19`) published — 18 versions in 2h37m |\n| 2026-05-12 ~14:12 | npm Security removes the malicious versions from the registry |\n| 2026-05-13 | BeProduct discovers the incident via Aikido's public disclosure |\n| 2026-05-14 | Compromised npm publish token revoked; BeProduct GitHub OAuth credentials rotated |\n| 2026-05-14 | Clean release `0.1.20` published; this advisory filed |\n\n## Root cause\n\nThe 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.\n\n## References\n\n- https://www.aikido.dev/blog/mini-shai-hulud-is-back-tanstack-compromised\n- https://www.aikido.dev/blog/checklist-github-actions\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@beproduct/nestjs-auth"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.2"
}, {
"last_affected" : "0.1.19"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/BeProduct/beproduct-org-nestjs-auth/security/advisories/GHSA-6xwp-cp5h-q856"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/BeProduct/beproduct-org-nestjs-auth"
}, {
"type" : "WEB",
"url" : "https://www.aikido.dev/blog/checklist-github-actions"
}, {
"type" : "WEB",
"url" : "https://www.aikido.dev/blog/mini-shai-hulud-is-back-tanstack-compromised"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-506" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-19T20:28:07Z",
"nvd_published_at" : null
}
}