Vulnerability · Published Feb 20, 2026 · Assigned by snyk

CVE-2026-2739

Medium 5.3

In plain English

A medium-severity infinite loop in bn.js. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 45% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.5%top 54.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-bn.jsno fix listedDEBIAN-CVE-2026-2739
Debian:13node-bn.jsno fix listedDEBIAN-CVE-2026-2739
Debian:14node-bn.js5.2.3+~5.2.0-1DEBIAN-CVE-2026-2739
Ubuntu:22.04:LTSnode-bn.jsno fix listedUBUNTU-CVE-2026-2739
Ubuntu:24.04:LTSnode-bn.jsno fix listedUBUNTU-CVE-2026-2739
Ubuntu:25.10node-bn.jsno fix listedUBUNTU-CVE-2026-2739
Ubuntu:26.04:LTSnode-bn.jsno fix listedUBUNTU-CVE-2026-2739
Ubuntu:26.10node-bn.jsno fix listedUBUNTU-CVE-2026-2739
npmbn.js5.2.3GHSA-378v-28hj-76wf
npmbn.js4.12.3GHSA-378v-28hj-76wf

Affected products (as reported)

VendorProductVersions
n/a bn.js 0 – before 5.2.3

Weakness: CWE-835 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P

References