GHSA-g3qw-9pgp-xpj4: Njwt Out-of-bounds Read Vulnerability

LOW
CWE-125
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-g3qw-9pgp-xpj4
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Njwt
Package Ecosystem npm
Published Date
Last Updated

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.

njwt fixed: 1.0.0
npm install njwt@1.0.0
Verify Direct and Transitive Dependencies

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

Versions of `njwt` prior to 1.0.0 are vulnerable to out-of-bounds reads when a number is passed into the `base64urlEncode` function. On 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. ## Recommendation Upgrade to version 1.0.0.

GHSA-g3qw-9pgp-xpj4 Affected Njwt Versions

1 component(s)
Fixed Versions:
1.0.0
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?
GHSA-g3qw-9pgp-xpj4 is a security vulnerability in Njwt involving Out-of-bounds Read in njwt under CWE-125: Out-of-bounds Read.
Which Njwt versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: njwt.
What version fixes GHSA-g3qw-9pgp-xpj4?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is njwt affected?
Yes, njwt is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What CWE is associated with GHSA-g3qw-9pgp-xpj4?
GHSA-g3qw-9pgp-xpj4 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check npm dependencies for GHSA-g3qw-9pgp-xpj4?
Run the dependency tree command: 'npm ls njwt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}