CVE-2026-2739
JSON

6.9medium

bn.js affected by an infinite loop

Severity
6.9medium CVSS:4.0 by snyk
Exploit likelihood
0.71% (higher than 49% of CVEs)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-378v-28hj-76wf

Description

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.

Affected

Product or packageVersionsReported by
bn.jsbefore 5.2.3CVE List
bn.js (npm)before 4.12.3, from 5.0.0 before 5.2.3GitHub Advisory Database

All scores

snyk6.9medium CVSS:4.0CVSS: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
snyk5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHubmedium CVSS:4.0CVSS: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

Classification

CWE-835

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Esto afecta a las versiones del paquete bn.js anteriores a la 5.2.3. Al llamar a maskn(0) en cualquier instancia de BN se corrompe el estado interno, lo que provoca que toString(), divmod() y otros métodos entren en un bucle infinito, bloqueando el proceso indefinidamente.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-2739 changed 2026-02-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-378v-28hj-76wf changed 2026-09-10CC-BY-4.0
NVDCVE-2026-2739 changed 2026-06-17Public domain