GHSA-qpw2-xchm-655q: Stringstream Out-of-Bounds Read Vulnerability
MODERATEGHSA-qpw2-xchm-655q is a MODERATE (CVSS 6.5) out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Stringstream libraries in the npm ecosystem. The issue involves out-of-bounds read in stringstream. Remediation is available by upgrading affected packages to version 0.0.6.
GHSA-qpw2-xchm-655q at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H).
How to Fix GHSA-qpw2-xchm-655q
To remediate this vulnerability, upgrade all affected Stringstream 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 stringstream@0.0.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls stringstream
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-qpw2-xchm-655q, inspect your project dependencies using npm:
npm ls stringstream
Analyze the terminal output to locate any version of Stringstream in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.6), your application is affected.
Note: The npm ls stringstream 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 Stringstream, 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-qpw2-xchm-655q Affected Stringstream Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
stringstream
|
npm |
< 0.0.6
|
0.0.6
|
References
Frequently Asked Questions
What is GHSA-qpw2-xchm-655q?
Which Stringstream versions are affected?
What version fixes GHSA-qpw2-xchm-655q?
Is stringstream affected?
What is the CVSS score of GHSA-qpw2-xchm-655q?
What CWE is associated with GHSA-qpw2-xchm-655q?
How can I check npm dependencies for GHSA-qpw2-xchm-655q?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qpw2-xchm-655q",
"modified" : "2021-05-04T20:42:24Z",
"published" : "2022-01-06T20:31:01Z",
"withdrawn" : "2021-03-19T20:58:21Z",
"aliases" : [ ],
"summary" : "Out-of-Bounds read in stringstream",
"details" : "Versions less than 0.0.6 of the Node.js stringstream module are vulnerable to an out-of-bounds read because of allocation of uninitialized buffers when a number is passed in the input stream (when using Node.js 4.x).\n\n# WITHDRAWN\n\nThis is a duplicate of GHSA-mf6x-7mm4-x2g7",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "stringstream"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-21270"
}, {
"type" : "WEB",
"url" : "https://github.com/mhart/StringStream/issues/7"
}, {
"type" : "WEB",
"url" : "https://github.com/mhart/StringStream/commit/2f4a9d496f94b0880e01a26857aa266a5a3ef274"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/321670"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/664"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-18T23:57:13Z",
"nvd_published_at" : null
}
}