CVE-2026-46412: Malicious postinstall credential theft in @beproduct/nestjs-auth
CVE-2026-46412 describes a software supply-chain compromise affecting the npm package @beproduct/nestjs-auth, a NestJS authentication module for BeProduct IDS with OpenID Connect support. Between 2026-05-11 20:19 UTC and 22:56 UTC, 18 malicious package versions, 0.1.2 through 0.1.19, were published using a compromised npm publish token. These versions contained a malicious postinstall payload that executed during package installation and attempted to harvest secrets from the installation environment. Targeted data included npm authentication tokens, GitHub personal access and OAuth tokens, GitHub Actions OIDC tokens, AWS credentials from environment variables and local credential files, HashiCorp Vault tokens, and other secrets exposed through environment variables or configuration files. Version 0.1.20 was identified as a clean republish of the original 0.1.1 source tree.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exposure to the malicious package can result in theft of developer, CI/CD, cloud, and secret-management credentials from the host where the package was installed. This can enable unauthorized package publication, source-code repository access, workflow abuse, cloud account access, secret vault access, and broader downstream supply-chain compromise. The reported activity also indicates potential follow-on repository tampering through automated commits to pull-request branches, increasing the risk of persistence, lateral movement across development environments, and compromise of dependent projects and release pipelines.
Mitigation
If you can’t patch tonight, do this now.
Until remediation is complete, prevent installation of the affected package versions and pin to the known-clean release. Restrict or disable lifecycle script execution where operationally feasible during dependency installation, especially in CI environments. Minimize secrets exposed to build and developer environments, use short-lived credentials where possible, and segregate package publishing, source-control, and cloud credentials to reduce blast radius. Monitor for unauthorized package publication, repository changes, and abnormal use of cloud or vault credentials originating from systems that installed the malicious versions.
Remediation
Patch, then assume compromise.
Remove affected versions of @beproduct/nestjs-auth in the range 0.1.2 through 0.1.19, clear the npm cache, and replace them with the clean version 0.1.20. Rotate every credential that may have been present on the installation host at install time, including npm publish tokens, GitHub personal access and OAuth tokens, GitHub Actions OIDC-related credentials, AWS access keys, HashiCorp Vault tokens, and any other secrets stored in environment variables or local configuration files. Review repository history for unauthorized changes, particularly unexpected additions to development-tooling directories, and investigate affected systems for signs of compromise. If compromise indicators are found, treat the host as fully compromised and rebuild or reimage it from a trusted baseline.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2026-46412 exploited in the wild?
- Yes. As of Sep 25, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2026-46412?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-46412.
- Is there a patch for CVE-2026-46412?
- Remove affected versions of @beproduct/nestjs-auth in the range 0.1.2 through 0.1.19, clear the npm cache, and replace them with the clean version 0.1.20. Rotate every credential that may have been present on the installation host at install time, including npm publish tokens, GitHub personal access and OAuth tokens, GitHub Actions OIDC-related credentials, AWS access keys, HashiCorp Vault tokens, and any other secrets stored in environment variables or local configuration files.
- How severe is CVE-2026-46412?
- CVE-2026-46412 has a CVSS v3.1 score of 10.0 (Critical) and an EPSS score of 0.77% (56th percentile) as of Sep 25, 2026.
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.