{"id":"UBUNTU-CVE-2026-2739","details":"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.","modified":"2026-05-20T16:12:12.642855334Z","published":"2026-02-20T05:17:00Z","upstream":["CVE-2026-2739"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-2739"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-2739"},{"type":"REPORT","url":"https://security.snyk.io/vuln/SNYK-JS-BNJS-15274301"},{"type":"REPORT","url":"https://github.com/indutny/bn.js/issues/316"},{"type":"REPORT","url":"https://github.com/indutny/bn.js/issues/186"},{"type":"REPORT","url":"https://gist.github.com/Kr0emer/02370d18328c28b5dd7f9ac880d22a91"},{"type":"REPORT","url":"https://github.com/indutny/bn.js/pull/317"},{"type":"REPORT","url":"https://github.com/indutny/bn.js/commit/33df26b5771e824f303a79ec6407409376baa64b"}],"affected":[{"package":{"name":"node-bn.js","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/node-bn.js?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.11.8-1"],"ecosystem_specific":{"binaries":[{"binary_name":"node-bn.js","binary_version":"4.11.8-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2739.json"}},{"package":{"name":"node-bn.js","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/node-bn.js?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.0.0-1","5.0.0-2","5.1.1-1","5.1.1-2"],"ecosystem_specific":{"binaries":[{"binary_name":"node-bn.js","binary_version":"5.1.1-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2739.json"}},{"package":{"name":"node-bn.js","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/node-bn.js?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.1.3-1","5.2.0-3"],"ecosystem_specific":{"binaries":[{"binary_name":"node-bn.js","binary_version":"5.2.0-3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2739.json"}},{"package":{"name":"node-bn.js","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/node-bn.js?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.2.1+~5.1.1-1"],"ecosystem_specific":{"binaries":[{"binary_version":"5.2.1+~5.1.1-1","binary_name":"node-bn.js"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2739.json"}},{"package":{"name":"node-bn.js","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/node-bn.js?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.2.1+~5.1.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"node-bn.js","binary_version":"5.2.1+~5.1.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2739.json"}},{"package":{"name":"node-bn.js","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/node-bn.js?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.2.1+~5.1.1-1","5.2.3+~5.2.0-1"],"ecosystem_specific":{"binaries":[{"binary_version":"5.2.3+~5.2.0-1","binary_name":"node-bn.js"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2739.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"},{"type":"CVSS_V4","score":"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"},{"type":"Ubuntu","score":"medium"}]}