GHSA-378v-28hj-76wf

Suggest an improvement
Source
https://github.com/advisories/GHSA-378v-28hj-76wf
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-378v-28hj-76wf/GHSA-378v-28hj-76wf.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-378v-28hj-76wf
Aliases
Downstream
Published
2026-02-20T06:30:39Z
Modified
2026-02-20T23:36:20.284716Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
  • 5.5 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
bn.js affected by an infinite loop
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.

Database specific
{
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-835"
    ],
    "github_reviewed_at": "2026-02-20T21:18:31Z",
    "github_reviewed": true,
    "nvd_published_at": "2026-02-20T05:17:53Z"
}
References

Affected packages

npm / bn.js

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.2.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-378v-28hj-76wf/GHSA-378v-28hj-76wf.json"