GHSA-g3qw-9pgp-xpj4: Njwt Out-of-bounds Read Vulnerability
LOWGHSA-g3qw-9pgp-xpj4 is a LOW out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Njwt libraries in the npm ecosystem. The issue involves out-of-bounds read in njwt. Remediation is available by upgrading affected packages to version 1.0.0.
GHSA-g3qw-9pgp-xpj4 at a Glance
How to Fix GHSA-g3qw-9pgp-xpj4
To remediate this vulnerability, upgrade all affected Njwt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install njwt@1.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls njwt
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-g3qw-9pgp-xpj4, inspect your project dependencies using npm:
npm ls njwt
Analyze the terminal output to locate any version of Njwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), your application is affected.
Note: The npm ls njwt command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Njwt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-g3qw-9pgp-xpj4 Affected Njwt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
njwt
|
npm |
< 1.0.0
|
1.0.0
|
References
Frequently Asked Questions
What is GHSA-g3qw-9pgp-xpj4?
Which Njwt versions are affected?
What version fixes GHSA-g3qw-9pgp-xpj4?
Is njwt affected?
What CWE is associated with GHSA-g3qw-9pgp-xpj4?
How can I check npm dependencies for GHSA-g3qw-9pgp-xpj4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g3qw-9pgp-xpj4",
"modified" : "2020-08-31T18:32:28Z",
"published" : "2020-09-01T21:08:44Z",
"aliases" : [ ],
"summary" : "Out-of-bounds Read in njwt",
"details" : "Versions of `njwt` prior to 1.0.0 are vulnerable to out-of-bounds reads when a number is passed into the `base64urlEncode` function. \n\nOn Node.js 6.x or lower this can expose sensitive information and on any other version of Node.js this creates a Denial of Service vulnerability.\n\n\n## Recommendation\n\nUpgrade to version 1.0.0.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "njwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://hackerone.com/reports/321704"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/679"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:32:28Z",
"nvd_published_at" : null
}
}