GHSA-j4mr-9xw3-c9jx: Base64 url Out-of-bounds Read Vulnerability

HIGH
CWE-125
Published
Advisory Summary

GHSA-j4mr-9xw3-c9jx is a HIGH out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Base64 url libraries in the npm ecosystem. The issue involves out-of-bounds read in base64-url. Remediation is available by upgrading affected packages to version 2.0.0.

GHSA-j4mr-9xw3-c9jx at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-j4mr-9xw3-c9jx
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Base64 url
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-j4mr-9xw3-c9jx

To remediate this vulnerability, upgrade all affected Base64 url dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

base64-url fixed: 2.0.0
npm install base64-url@2.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 base64-url

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-j4mr-9xw3-c9jx, inspect your project dependencies using npm:

npm ls base64-url

Analyze the terminal output to locate any version of Base64 url in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.

Note: The npm ls base64-url 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 Base64 url, 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 `base64-url` before 2.0.0 are vulnerable to out-of-bounds read as it allocates uninitialized Buffers when number is passed in input. ## Recommendation Update to version 2.0.0 or later.

GHSA-j4mr-9xw3-c9jx Affected Base64 url Versions

1 component(s)
Fixed Versions:
2.0.0
Product / Package Ecosystem Affected Versions Fixed Version
base64-url
npm
< 2.0.0
2.0.0

References

Frequently Asked Questions

What is GHSA-j4mr-9xw3-c9jx?
GHSA-j4mr-9xw3-c9jx is a security vulnerability in Base64 url involving Out-of-bounds Read in base64-url under CWE-125: Out-of-bounds Read.
Which Base64 url versions are affected?
Affected versions include releases prior to 2.0.0 across affected packages: base64-url.
What version fixes GHSA-j4mr-9xw3-c9jx?
Upgrading to 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is base64-url affected?
Yes, base64-url is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What CWE is associated with GHSA-j4mr-9xw3-c9jx?
GHSA-j4mr-9xw3-c9jx 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-j4mr-9xw3-c9jx?
Run the dependency tree command: 'npm ls base64-url'. 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-j4mr-9xw3-c9jx",
  "modified" : "2020-08-31T18:31:43Z",
  "published" : "2019-05-31T23:47:01Z",
  "aliases" : [ ],
  "summary" : "Out-of-bounds Read in base64-url",
  "details" : "Versions of `base64-url` before 2.0.0 are vulnerable to out-of-bounds read as it allocates uninitialized Buffers when number is passed in input.\n\n\n## Recommendation\n\nUpdate to version 2.0.0 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "base64-url"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/321692"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/660"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-05-31T23:45:33Z",
    "nvd_published_at" : null
  }
}