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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-bn.js | no fix listed | DEBIAN-CVE-2026-2739 |
| Debian:13 | node-bn.js | no fix listed | DEBIAN-CVE-2026-2739 |
| Debian:14 | node-bn.js | 5.2.3+~5.2.0-1 | DEBIAN-CVE-2026-2739 |
| Ubuntu:22.04:LTS | node-bn.js | no fix listed | UBUNTU-CVE-2026-2739 |
| Ubuntu:24.04:LTS | node-bn.js | no fix listed | UBUNTU-CVE-2026-2739 |
| Ubuntu:25.10 | node-bn.js | no fix listed | UBUNTU-CVE-2026-2739 |
| Ubuntu:26.04:LTS | node-bn.js | no fix listed | UBUNTU-CVE-2026-2739 |
| Ubuntu:26.10 | node-bn.js | no fix listed | UBUNTU-CVE-2026-2739 |
| npm | bn.js | 5.2.3 | GHSA-378v-28hj-76wf |
| npm | bn.js | 4.12.3 | GHSA-378v-28hj-76wf |
Affected products (as reported)
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
- https://security.snyk.io/vuln/SNYK-JS-BNJS-15274301
- https://github.com/indutny/bn.js/issues/316
- https://github.com/indutny/bn.js/issues/186
- https://gist.github.com/Kr0emer/02370d18328c28b5dd7f9ac880d22a91
- https://github.com/indutny/bn.js/pull/317
- https://github.com/indutny/bn.js/commit/33df26b5771e824f303a79ec6407409376baa64b