Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

MAL-2026-10162: Malicious code in @bcryptln/becryptjs (npm)

0
High
Published: 07/10/2026 (07/10/2026, 17:16:37 UTC)
Source: GCVE Database
Product: @bcryptln/becryptjs

Description

The npm package @bcryptln/becryptjs impersonates the legitimate bcryptjs library but contains malicious code hidden in its ESM entrypoint. This code uses obfuscation and dynamic function construction to execute a payload with full CommonJS capabilities, enabling access to filesystem and network modules. The malicious payload is only present in the ESM import path, while the CommonJS entrypoint remains clean to evade detection. This behavior is consistent with a supply-chain trojan targeting modern JavaScript module consumers.

Affected software

npmghsa
@bcryptln/becryptjs
Affected versions
=3.0.8=3.0.10=3.0.11

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/11/2026, 09:57:01 UTC

Technical Analysis

The package @bcryptln/becryptjs, which mimics the widely-used bcryptjs library, includes a malicious payload appended after legitimate code in its ESM entrypoint (index.js). The payload uses custom string-shuffle decoders to hide the use of the JavaScript Function constructor, which is dynamically created and invoked. It re-exposes CommonJS primitives such as require, module, __dirname, and __filename as globals, allowing the payload to access powerful Node.js modules like fs, child_process, http, and net. The CommonJS/UMD entrypoint (umd/index.js) is a clean copy of the upstream library, making the malicious code only active when the package is imported as an ESM module. This split and obfuscation strategy indicates an intentional supply-chain trojan designed to evade code review and detection.

Potential Impact

Consumers importing @bcryptln/becryptjs as an ESM module risk executing malicious code with full CommonJS module access, potentially allowing arbitrary code execution, filesystem manipulation, network communication, and process spawning. This compromises the security and integrity of applications using this package version.

Mitigation Recommendations

No official patch or remediation guidance is currently available. Users should avoid using the affected versions of @bcryptln/becryptjs (=3.0.8, =3.0.10, =3.0.11). Instead, they should switch to the legitimate bcryptjs package or verify package authenticity before use. Monitor vendor advisories for updates or official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-10162
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a520ec868715ace438f5eb6

Added to database: 07/11/2026, 09:37:12 UTC

Last enriched: 07/11/2026, 09:57:01 UTC

Last updated: 07/11/2026, 16:46:39 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses