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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | bn.js | < 5.2.3 | 5.2.3 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-bn.js | 5.2.3+~5.2.0-1 | — |
| Debian 13 | node-bn.js | No fix yet | — |
| Debian 12 | node-bn.js | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | node-bn.js | No fix yet | — |
| Ubuntu 26.04 LTS | node-bn.js | No fix yet | — |
| Ubuntu 25.10 | node-bn.js | No fix yet | — |
| Ubuntu 24.04 LTS | node-bn.js | No fix yet | — |
| Ubuntu 22.04 LTS | node-bn.js | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | node-bn.js | No fix yet | — |
| Ubuntu 18.04 LTS | node-bn.js | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | velociraptor | 0.7.0.4.git185.a5708584-2.1 | openSUSE-SU-2026:11126-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 2 (CBL-Mariner) | reaper | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | nextcloud-server-33 | 33.0.6-r9 | — |
| Wolfi rolling | opensearch-dashboards-3 | 3.5.0-r5 | — |
| Wolfi rolling | sqlpad | 7.5.7-r10 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | bn.js | < 4.12.3 | 4.12.3 | GHSA-378v-28hj-76wf |
| npm | bn.js | >= 5.0.0, < 5.2.3 | 5.2.3 | GHSA-378v-28hj-76wf |
Advisories 2
- WID-SEC-2026-2933 Splunk SOAR: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 2, 2026
- openSUSE-SU-2026:11126-1 velociraptor-0.7.0.4.git185.a5708584-2.1 on GA media SUSE / openSUSE Security Updates · Jun 26, 2026
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