CVE catalog

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, han

[CVE catalog]

Severity
High · CVSS 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.53% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiannode-bn.jssid5.2.5+~5.2.0-1fixed
Debiannode-bn.jsforky5.2.5+~5.2.0-1fixed
Debiannode-bn.jstrixie5.2.1+~5.1.1-1vulnerable
Debiannode-bn.jsbookworm5.2.1+~5.1.1-1vulnerable
Npmbn.jsNot reported5.2.3fixed
Cpenode-bn.jsNot reportedNot reportedvulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiannode-bn.jssourcesid5.2.3+~5.2.0-1not yet assignedNot reported[1128619]
Debiannode-bn.jssourceforky5.2.3+~5.2.0-1not yet assignedNot reported[1128619]
Debiannode-bn.jssourcetrixie(unfixed)not yet assignedNot reported[1128619]
Debiannode-bn.jssourcebookworm(unfixed)not yet assignedNot reported[1128619]
Npmbn.jsnpmNot reported5.2.3Not reportedNot reportedNot reported

[Debian bug #1128619]

Notes

[trixie] node-bn.js: Minor issue [bookworm] node-bn.js: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [node-bn.js]Affected
    Details (2)
    • 5.2.1+~5.1.1-1 · all · bookworm

      Affected

      nvd · node-bn.js · debian · bookworm; nvd · node-bn.js · debian · 12

    • 5.2.1+~5.1.1-1 · all · bookworm

      Affected

      nvd · node-bn.js · debian · bookworm; nvd · node-bn.js · debian · 12

[Debian 13 (Trixie)]

  • [node-bn.js]Affected
    Details (2)
    • 5.2.1+~5.1.1-1 · all · trixie

      Affected

      nvd · node-bn.js · debian · 13

    • 5.2.1+~5.1.1-1 · all · trixie

      Affected

      nvd · node-bn.js · debian · 13

Observed:

References