Infinite loop in bn.js
Priority HIGH 70CWE-835Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 16 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-835.
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.
Why it matters now
Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00531 45th percentileScored 2026-11-07
Fix Partial bn.js: 5.2.3bn.js (npm): 4.12.3, 5.2.3Red Hat: 16 without a fix
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | bn.js | before 5.2.3 | 5.2.3 | Patch available | CNA |
| — | bn.js (npm) | before 4.12.3 | 4.12.3 | Patch available | GHSA-378v-28hj-76wf |
| — | bn.js (npm) | 5.0.0 to before 5.2.3 | 5.2.3 | Patch available | GHSA-378v-28hj-76wf |
- bn.js Vendor— Affected before 5.2.3 Fixed in 5.2.3 Patch available CNA
- bn.js (npm) Vendor— Affected before 4.12.3 Fixed in 4.12.3 Patch available GHSA-378v-28hj-76wf
- bn.js (npm) Vendor— Affected 5.0.0 to before 5.2.3 Fixed in 5.2.3 Patch available GHSA-378v-28hj-76wf
Remediation
- Fix · CNA bn.js Fixed in 5.2.3
- Fix · GHSA-378v-28hj-76wf bn.js (npm) Fixed in 4.12.3 Advisory →
- Fix · GHSA-378v-28hj-76wf bn.js (npm) Fixed in 5.2.3 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Logging Subsystem for Red Hat OpenShift | Affected | No fix planned: Out of support scope |
| OpenShift Pipelines | Affected | No fix yet: Fix deferred |
| OpenShift Service Mesh 2 | Affected | No fix planned: Out of support scope |
| OpenShift Service Mesh 3 | Affected | No fix yet: Fix deferred |
| Red Hat 3scale API Management Platform 2 | Affected | No fix planned: Out of support scope |
| Red Hat Developer Hub 1 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat Fuse 7 | Affected | No fix planned: Out of support scope |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
| Red Hat Process Automation 7 | Affected | No fix planned: Out of support scope |
| Red Hat Quay 3 | Affected | No fix yet: Fix deferred |
| Red Hat build of Apicurio Registry 2 | Affected | No fix yet: Fix deferred |
| streams for Apache Kafka 2 | Affected | No fix yet: Fix deferred |
| streams for Apache Kafka 3 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-2739
- 2026-10-03 Alias added: GHSA-378v-28hj-76wf
- 2026-10-18 EPSS moved to the 50th–90th percentile
- 2026-10-25 EPSS moved to the below the 50th percentile
- 2026-10-27 Affected versions changed · Red Hat
References
Other 8
- https://github.com/indutny/bn.js/issues/316
- https://github.com/indutny/bn.js/issues/186
- https://gist.github.com/Kr0emer/02370d18328c28b5dd7f9ac880d22a91
- https://github.com/indutny/bn.js/pull/317
- https://github.com/indutny/bn.js/commit/33df26b5771e824f303a79ec6407409376baa64b
- https://github.com/indutny/bn.js/issues/316#issuecomment-3924217358
- https://github.com/indutny/bn.js
- https://github.com/indutny/bn.js/releases/tag/v5.2.3
Sources
- CVE-2026-2739 · CVE Program
- CVE-2026-2739 · NVD
- FIRST EPSS
- GHSA-378v-28hj-76wf · GitHub Advisory Database · CC BY 4.0
- CVE-2026-2739 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences