Medium, CVSS 5.5npmAmendedPublished
bn.js affected by an infinite loop
CVE-2026-2739 · GHSA-378v-28hj-76wf
- Affected
- npm bn.js < 4.12.3; >= 5.0.0, < 5.2.3
- Fixed in
- 4.12.35.2.3· Vendor fix available
- Issue
- This affects versions of the package bn.js before 4.12.3 and 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.
Recommended action: Upgrade to 5.2.3 or 4.12.3 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.