GHSA-378v-28hj-76wf

bn.js affected by an infinite loop

At a glance

Published
Updated
CVE
CVE-2026-2739
CVSS_V3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS_V4
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P

Description

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.

Affected packages

PackageVersions
npm · bn.jsintroduced 0, fixed 4.12.3
npm · bn.jsintroduced 5.0.0, fixed 5.2.3

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — GitHub Advisory Database