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.
Published: 2026-07-20
Score: 10 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Between 2026‑05‑11 20:19 UTC and 22:56 UTC, an attacker exploited a compromised npm publish token to release 18 malicious versions (0.1.2 through 0.1.19) of the @beproduct/nestjs-auth NPM package. The postinstall script in these releases automatically harvested credentials from the installation environment, including npm tokens, GitHub personal access tokens, OAuth tokens, AWS access keys, HashiCorp Vault tokens, and other secrets found in environment variables or configuration files. The worm also added setup.mjs and hook configuration files to PR branches via automated agent runtimes, enabling persistence and potential further exploitation. The likely attack vector is that an attacker publishes a modified package and any user who installs it runs the malicious script; this inference is drawn from the described postinstall behavior. This is an instance of CWE‑506 (Embedded Malicious Code).

Affected Systems

The affected product is BeProduct’s NestJS authentication module, beproduct-org-nestjs-auth, for which versions 0.1.2 through 0.1.19 are compromised. Any Node.js or NestJS application that depends on these releases and runs the postinstall script is at risk. The clean republished release 0.1.20 is safe, but versions outside this range were not reported to be affected.

Risk and Exploitability

The CVSS score of 10 indicates critical severity. The EPSS score is < 1%, suggesting a low overall exploitation probability, yet the fact that any consumer who installs a vulnerable version will automatically run the malicious postinstall script makes the risk high. The vulnerability is not listed in CISA KEV. Based on the description, it is inferred that an attacker only needs to publish a malicious package; any Node.js or NestJS app that installs the package without validating signatures will execute the payload, leading to credential theft and the possibility of persistence on the victim’s systems.

Generated by OpenCVE AI on July 30, 2026 at 19:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Remove the affected package and clear the npm cache.
  • Install the clean republished version 0.1.20 of @beproduct/nestjs-auth.
  • Rotate every credential that may have been exposed during install: all NPM publish tokens, GitHub PATs and OAuth tokens, AWS access keys, HashiCorp Vault tokens, and any other secrets present in environment files or configuration.

Generated by OpenCVE AI on July 30, 2026 at 19:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6xwp-cp5h-q856 Malicious code in @beproduct/nestjs-auth (0.1.2 through 0.1.19) — Mini Shai-Hulud worm
History

Tue, 28 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
First Time appeared Beproduct
Beproduct beproduct/nestjs-auth
Vendors & Products Beproduct
Beproduct beproduct/nestjs-auth

Mon, 20 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 20 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
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.
Title Malicious code in @beproduct/nestjs-auth (0.1.2 through 0.1.19) — Mini Shai-Hulud worm
Weaknesses CWE-506
References
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}


Subscriptions

Beproduct Beproduct/nestjs-auth
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T15:32:29.327Z

Reserved: 2026-05-13T21:04:10.933Z

Link: CVE-2026-46412

cve-icon Vulnrichment

Updated: 2026-07-20T15:32:23.089Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T19:30:09Z

Weaknesses