CVE-2026-2739 Details
Description
This affects versions of the package bn.js before 5.2.3. Calling maskn(0) on any BN instance corrupts the internal state, causing toString(), divmod(), and other methods to enter an infinite loop, hanging the process indefinitely.
A denial-of-service vulnerability has been identified in the bn.js package, affecting all versions prior to 5.2.3. The issue arises when the maskn(0) method is called on any BN instance, which corrupts the internal state of the object. This corruption causes methods like toString() and divmod() to enter an infinite loop, effectively hanging the process indefinitely. The vulnerability is rooted in the way maskn(0) sets the object's length to 0, violating an internal invariant that requires the length to be at least 1. As a result, any method that relies on this invariant can loop forever, causing a complete process hang.
Users can upgrade to bn.js version 5.2.3 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Feb 20, 2026CISA-ADP
Assessed Feb 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://gist.github.com/Kr0emer/02370d18328c28b5dd7f9ac880d22a91 | [email protected] | ExploitTechnical Analysis |
| https://github.com/indutny/bn.js/commit/33df26b5771e824f303a79ec6407409376baa64b | [email protected] | Source CodeVendor |
| https://github.com/indutny/bn.js/issues/186 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://github.com/indutny/bn.js/issues/316 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://github.com/indutny/bn.js/pull/317 | [email protected] | Source CodeVendor |
| https://security.snyk.io/vuln/SNYK-JS-BNJS-15274301 | [email protected] | AdvisoryExploitRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-835 | Loop with Unreachable Exit Condition ('Infinite Loop') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| indutny bn.js | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 20, 2026 | New CVE Received | [email protected] |
Volerion