{"id":"CVE-2026-2739","aliases":["CVE-2026-2739","GHSA-378v-28hj-76wf"],"related":[],"kind":"vulnerability","state":"published","title":"bn.js affected by an infinite loop","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-02-20T05:00:08.253Z","modified":"2026-09-10T03:50:33.815Z","severity":{"scorer":"snyk","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"5.2.3","status":"affected"}],"product":"bn.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.12.3"}],"ecosystem":"npm","package":"bn.js","purl":"pkg:npm/bn.js","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.2.3"}],"ecosystem":"npm","package":"bn.js","purl":"pkg:npm/bn.js","source":"ghsa"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-BNJS-15274301","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/indutny/bn.js/issues/316","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/indutny/bn.js/issues/186","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://gist.github.com/Kr0emer/02370d18328c28b5dd7f9ac880d22a91","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/indutny/bn.js/pull/317","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/indutny/bn.js/commit/33df26b5771e824f303a79ec6407409376baa64b","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-2739","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/indutny/bn.js/issues/316#issuecomment-3924217358","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/indutny/bn.js","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/indutny/bn.js/releases/tag/v5.2.3","tags":["web"],"sources":["ghsa"]}],"credits":["Kr0emer"],"assigner":"snyk","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-02-20T15:00:34.443Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-2739","url":"https://www.cve.org/CVERecord?id=CVE-2026-2739","licence":"CVE Terms of Use","modified":"2026-02-20T15:03:53.743Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-378v-28hj-76wf","url":"https://github.com/advisories/GHSA-378v-28hj-76wf","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:33.815Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-2739","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-2739","licence":"Public domain","modified":"2026-06-17T10:31:38.003Z"}],"updatedAt":"2026-11-25T22:59:14.332Z","epss":{"score":0.00714,"percentile":0.49449,"date":"2026-11-30T12:00:22.000Z"}}