FlawAtlas
Search the atlas
CVE-2026-2739 Moderate

bn.js affected by an infinite loop

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.

Exploit probability 0.5%
Published February 20, 2026
Required by Not available
Last source change February 25, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

120 explicit affected versions

npm bn.js

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2026-2739

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.

View original source
Open Source Vulnerabilities GHSA-378v-28hj-76wf

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.

View original source

05 / REFERENCES

Further evidence