CVE-2026-46412
JSON

10.0critical

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

Severity
10.0critical CVSS:3.1 by GitHub_M
Exploit likelihood
0.42% (higher than 38% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6xwp-cp5h-q856

Description

@beproduct/nestjs-auth is a NestJS authentication module for BeProduct IDS (Identity Server) with OpenID Connect support. 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 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; and other secrets present in environment variables. Version `0.1.20` is a clean republish from the original `0.1.1` source tree. Anyone who installed any version in the range `>=0.1.2 <=0.1.19` should remove the package and clean the npm cache; install the clean version; rotate every credential present in the install environment, including all npm publish tokens, all GitHub PATs and OAuth tokens, AWS access keys, HashiCorp Vault tokens, and any other secret that was in env vars or config files at install time; scan affected hosts for indicators of compromise and, if any are found, treat the host as compromised and reimage; and 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.

Affected

Product or packageVersionsReported by
BeProduct beproduct-org-nestjs-auth>= 0.1.2, <= 0.1.19CVE List
@beproduct/nestjs-auth (npm)from 0.1.2 up to 0.1.19GitHub Advisory Database

All scores

GitHub_M10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHub10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-506

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

@beproduct/nestjs-auth is a NestJS authentication module for BeProduct IDS (Identity Server) with OpenID Connect support. 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 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; and other secrets present in environment variables. Version `0.1.20` is a clean republish from the original `0.1.1` source tree. Anyone who installed any version in the range `>=0.1.2 <=0.1.19` should remove the package and clean the npm cache; install the clean version; rotate every credential present in the install environment, including all npm publish tokens, all GitHub PATs and OAuth tokens, AWS access keys, HashiCorp Vault tokens, and any other secret that was in env vars or config files at install time; scan affected hosts for indicators of compromise and, if any are found, treat the host as compromised and reimage; and 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.

GitHub Advisory Database

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

NVD (es)

“@beproduct/nestjs-auth” es un módulo de autenticación de NestJS para BeProduct IDS (Identity Server) con soporte OpenID Connect. Entre el 11-05-2026 20:19 UTC y las 22:56 UTC, un atacante utilizó un token de publicación de npm comprometido para publicar 18 versiones maliciosas de “@beproduct/nestjs-auth” (0.1.2 a 0.1.19). La carga útil de postinstalación intentó recolectar tokens de npm (de “~/.npmrc”); tokens de acceso personal de GitHub, tokens de OAuth (“gho_*”), y tokens OIDC de Actions; credenciales de AWS (de variables de entorno y “~/.aws/credentials”); tokens de HashiCorp Vault; y otros secretos presentes en las variables de entorno. La versión “0.1.20” es una republicación limpia del árbol de código fuente original “0.1.1”. Cualquiera que haya instalado cualquier versión en el rango “>=0.1.2 menor o igual que 0.1.19” debería eliminar el paquete y limpiar la caché de npm; instalar la versión limpia; rotar cada credencial presente en el entorno de instalación, incluyendo todos los tokens de publicación de npm, todos los PATs y tokens de OAuth de GitHub, claves de acceso de AWS, tokens de HashiCorp Vault, y cualquier otro secreto que estuviera en las variables de entorno o archivos de configuración en el momento de la instalación; escanear los hosts afectados en busca de indicadores de compromiso y, si se encuentra alguno, tratar el host como comprometido y reinstalar la imagen; y verificar el historial del repositorio en busca de adiciones inesperadas en los directorios “.claude/” o “.vscode/”. Se sabe que el gusano realiza commits de “setup.mjs” + configuraciones de hook a las ramas de PR a través de tiempos de ejecución de agentes automatizados.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-46412 changed 2026-07-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-6xwp-cp5h-q856 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-46412 changed 2026-10-24Public domain