CVE-2026-2739: Medium severity npm/bn.js vulnerability

Published Feb 20, 2026
·
Updated

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.

Other sources

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.

NVD

Affected Software

5 affected componentsFixes available
npm/bn.js<5.2.3
npm/bn.js>=5.0.0<5.2.3
5.2.3
npm/bn.js<4.12.3
4.12.3
Microsoft cbl2 reaper 3.1.1-22
IBM watsonx.data intelligence<=5.2.2, 5.3.0, 5.3.1, 5.3.1-patch-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/bn.js to a version that resolves this vulnerability.

    Fixed in 5.2.3
  2. Upgrade

    Upgrade npm/bn.js to a version that resolves this vulnerability.

    Fixed in 4.12.3
  3. Upgrade

    Upgrade bn.js to a version that resolves this vulnerability.

    Fixed in 4.12.3
  4. Upgrade

    Upgrade bn.js to a version that resolves this vulnerability.

    Fixed in 5.2.3

Event History

Feb 20, 2026
CVE Published
via MITRE·05:00 AM
Data Sourced
via MITRE·05:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 AM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:30 AM
Data Sourced
via GitHub·06:30 AM
DescriptionSeverityWeaknessAffected Software
Feb 25, 2026
Data Sourced
via Microsoft·09:03 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·09:03 AM
Affected Software
Updated
via Microsoft·09:03 AM
DescriptionSeverity
Jun 24, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-2739?

CVE-2026-2739 is classified as a critical vulnerability due to its potential to cause application hang and impact system performance.

2

How do I fix CVE-2026-2739?

To mitigate CVE-2026-2739, upgrade your bn.js package to version 5.2.3 or later.

3

What versions are affected by CVE-2026-2739?

CVE-2026-2739 affects all versions of the bn.js package prior to 5.2.3.

4

What happens if I call maskn(0) on a BN instance in CVE-2026-2739?

Calling maskn(0) on a BN instance can corrupt its internal state, leading to infinite loops in various methods like toString() and divmod().

5

Can CVE-2026-2739 affect production environments?

Yes, CVE-2026-2739 can significantly affect production environments by causing processes to hang indefinitely.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203