Vulnerabilities in pkg:npm/base64url
PACKAGEGHSA-rvg8-pwq2-xj7q is a MODERATE out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Base64url libraries in the npm ecosystem. The issue involves out-of-bounds read in base64url. Remediation is available by upgrading affected packages to version 3.0.0.
pkg:npm/base64url
Vulnerability advisories affecting package pkg:npm/base64url. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-rvg8-pwq2-xj7q | - | MODERATE | Out-of-bounds Read in base64url |
GHSA-rvg8-pwq2-xj7q at a Glance
How to Fix GHSA-rvg8-pwq2-xj7q
To remediate this vulnerability, upgrade all affected Base64url 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 base64url@3.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls base64url
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-rvg8-pwq2-xj7q, inspect your project dependencies using npm:
npm ls base64url
Analyze the terminal output to locate any version of Base64url in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.
Note: The npm ls base64url 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 Base64url, 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-rvg8-pwq2-xj7q Affected Base64url Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
base64url
|
npm |
< 3.0.0
|
3.0.0
|
References
Frequently Asked Questions
What is GHSA-rvg8-pwq2-xj7q?
Which Base64url versions are affected?
What version fixes GHSA-rvg8-pwq2-xj7q?
Is base64url affected?
What CWE is associated with GHSA-rvg8-pwq2-xj7q?
How can I check npm dependencies for GHSA-rvg8-pwq2-xj7q?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rvg8-pwq2-xj7q",
"modified" : "2021-09-24T20:34:56Z",
"published" : "2020-09-01T20:42:44Z",
"aliases" : [ ],
"summary" : "Out-of-bounds Read in base64url",
"details" : "Versions of `base64url` before 3.0.0 are vulnerable to to out-of-bounds reads as it allocates uninitialized Buffers when number is passed in input on Node.js 4.x and below.\n\n\n## Recommendation\n\nUpdate to version 3.0.0 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "base64url"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/brianloveswords/base64url/pull/25"
}, {
"type" : "WEB",
"url" : "https://github.com/brianloveswords/base64url/commit/4fbd954a0a69e9d898de2146557cc6e893e79542"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/321687"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/brianloveswords/base64url"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:31:38Z",
"nvd_published_at" : null
}
}