CVE-2026-2739

bn.js: bn.js: Denial of Service via calling maskn(0)

Published Feb 20, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-378v-28hj-76wf bn.js affected by an infinite loop
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title bn.js: bn.js: Denial of Service via calling maskn(0)
References
Metrics threat_severity

None

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Indutny
Indutny bn.js
Vendors & Products Indutny
Indutny bn.js
Type Values Removed Values Added
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.
Weaknesses CWE-835
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
snyk
Published
Updated
Feb 20, 2026, 3:03 PM
Reserved
Feb 19, 2026, 10:59 AM
Status
Deferred
Published
Feb 20, 2026, 5:17 AM
Modified
Jun 17, 2026, 10:31 AM
Severity
Moderate
Public date
Feb 20, 2026, 5:00 AM