CVE-2026-46412: CWE-506: Embedded Malicious Code in BeProduct beproduct-org-nestjs-auth
@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.
AI Analysis
Technical Summary
@beproduct/nestjs-auth, a NestJS authentication module for BeProduct IDS, was compromised via a stolen npm publish token, leading to the publication of 18 malicious versions (0.1.2 through 0.1.19). The malicious postinstall script attempted to exfiltrate sensitive credentials from environment variables and configuration files, including npm tokens, GitHub tokens, AWS credentials, and Vault tokens. The clean version 0.1.20 restores the original source code. The attack includes persistence mechanisms that commit malicious files to PR branches. This vulnerability is classified under CWE-506 (Embedded Malicious Code) and carries a CVSS 3.1 score of 10.0 (critical). The product is a cloud service, and remediation involves removing affected versions, credential rotation, and host compromise assessment.
Potential Impact
The malicious versions of the package can lead to the theft of a wide range of sensitive credentials and tokens from the installation environment, including npm publish tokens, GitHub personal access tokens, OAuth tokens, AWS credentials, and HashiCorp Vault tokens. This can result in full compromise of developer environments, source code repositories, cloud resources, and secret management systems. The embedded malicious code also attempts to maintain persistence by committing malicious files to pull request branches, increasing the risk of further compromise and lateral movement.
Mitigation Recommendations
A patch is available in the form of version 0.1.20, which is a clean republish from the original source. Users who installed any version between 0.1.2 and 0.1.19 inclusive should immediately remove those versions, clean the npm cache, and install version 0.1.20. All credentials present during installation—including npm publish tokens, GitHub personal access tokens, OAuth tokens, AWS access keys, and HashiCorp Vault tokens—must be rotated. Hosts should be scanned for indicators of compromise, and any compromised hosts should be reimaged. Additionally, repository history should be checked for unauthorized commits in .claude/ or .vscode/ directories. Since this is a cloud service, the vendor manages remediation for the service itself, but local environment remediation is critical.
CVE-2026-46412: CWE-506: Embedded Malicious Code in BeProduct beproduct-org-nestjs-auth
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.
CVSS v3.1
Score 10.0critical
Affected software
pkg:npm/@beproduct/nestjs-authRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
@beproduct/nestjs-auth, a NestJS authentication module for BeProduct IDS, was compromised via a stolen npm publish token, leading to the publication of 18 malicious versions (0.1.2 through 0.1.19). The malicious postinstall script attempted to exfiltrate sensitive credentials from environment variables and configuration files, including npm tokens, GitHub tokens, AWS credentials, and Vault tokens. The clean version 0.1.20 restores the original source code. The attack includes persistence mechanisms that commit malicious files to PR branches. This vulnerability is classified under CWE-506 (Embedded Malicious Code) and carries a CVSS 3.1 score of 10.0 (critical). The product is a cloud service, and remediation involves removing affected versions, credential rotation, and host compromise assessment.
Potential Impact
The malicious versions of the package can lead to the theft of a wide range of sensitive credentials and tokens from the installation environment, including npm publish tokens, GitHub personal access tokens, OAuth tokens, AWS credentials, and HashiCorp Vault tokens. This can result in full compromise of developer environments, source code repositories, cloud resources, and secret management systems. The embedded malicious code also attempts to maintain persistence by committing malicious files to pull request branches, increasing the risk of further compromise and lateral movement.
Mitigation Recommendations
A patch is available in the form of version 0.1.20, which is a clean republish from the original source. Users who installed any version between 0.1.2 and 0.1.19 inclusive should immediately remove those versions, clean the npm cache, and install version 0.1.20. All credentials present during installation—including npm publish tokens, GitHub personal access tokens, OAuth tokens, AWS access keys, and HashiCorp Vault tokens—must be rotated. Hosts should be scanned for indicators of compromise, and any compromised hosts should be reimaged. Additionally, repository history should be checked for unauthorized commits in .claude/ or .vscode/ directories. Since this is a cloud service, the vendor manages remediation for the service itself, but local environment remediation is critical.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-13T21:04:10.933Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Is Cloud Service
- true
Threat ID: 6a5e3e5d2a4a8d5989464da7
Added to database: 07/20/2026, 15:27:25 UTC
Last enriched: 07/20/2026, 15:41:57 UTC
Last updated: 07/21/2026, 03:48:47 UTC
Views: 13
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.