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 package | Versions | Reported by |
|---|---|---|
| bn.js | before 5.2.3 | CVE List |
| bn.js (npm) | before 4.12.3, from 5.0.0 before 5.2.3 | GitHub Advisory Database |
All scores
| snyk | 6.9medium CVSS:4.0 | 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 |
| snyk | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | medium CVSS:4.0 | 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 |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-2739 changed 2026-02-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-378v-28hj-76wf changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-2739 changed 2026-06-17 | Public domain |