GHSA-j4mr-9xw3-c9jx: Base64 url Out-of-bounds Read Vulnerability
HIGHGHSA-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
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.
npm install base64-url@2.0.0
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
GHSA-j4mr-9xw3-c9jx Affected Base64 url Versions
1 component(s)| 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?
Which Base64 url versions are affected?
What version fixes GHSA-j4mr-9xw3-c9jx?
Is base64-url affected?
What CWE is associated with GHSA-j4mr-9xw3-c9jx?
How can I check npm dependencies for GHSA-j4mr-9xw3-c9jx?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}