Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-2739 EUVD-2026-8025GHSA-378v-28hj-76wf

bn.js affected by an infinite loop

Published Feb 20, 2026 · Updated Feb 20, 2026 · Assigned by snyk

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

VendorProductAffectedFixed
— 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.

ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS node-bn.js No fix yet —
Ubuntu 18.04 LTS node-bn.js No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed velociraptor 0.7.0.4.git185.a5708584-2.1 openSUSE-SU-2026:11126-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) reaper No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
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

EcosystemPackageAffectedFixedRecord
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

References