GHSA-pgr8-jg6h-8gw6: Webpack bundle analyzer Cross-Site Scripting Vulnerability
MODERATEGHSA-pgr8-jg6h-8gw6 is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Webpack bundle analyzer libraries in the npm ecosystem. The issue involves cross-site scripting in webpack-bundle-analyzer. Remediation is available by upgrading affected packages to version 3.3.2.
GHSA-pgr8-jg6h-8gw6 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L).
How to Fix GHSA-pgr8-jg6h-8gw6
To remediate this vulnerability, upgrade all affected Webpack bundle analyzer 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 webpack-bundle-analyzer@3.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls webpack-bundle-analyzer
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-pgr8-jg6h-8gw6, inspect your project dependencies using npm:
npm ls webpack-bundle-analyzer
Analyze the terminal output to locate any version of Webpack bundle analyzer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.2), your application is affected.
Note: The npm ls webpack-bundle-analyzer 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Webpack bundle analyzer, 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-pgr8-jg6h-8gw6 Affected Webpack bundle analyzer Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
webpack-bundle-analyzer
|
npm |
< 3.3.2
|
3.3.2
|
References
Frequently Asked Questions
What is GHSA-pgr8-jg6h-8gw6?
Which Webpack bundle analyzer versions are affected?
What version fixes GHSA-pgr8-jg6h-8gw6?
Is webpack-bundle-analyzer affected?
What is the CVSS score of GHSA-pgr8-jg6h-8gw6?
What CWE is associated with GHSA-pgr8-jg6h-8gw6?
How can I check npm dependencies for GHSA-pgr8-jg6h-8gw6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pgr8-jg6h-8gw6",
"modified" : "2021-08-04T15:26:36Z",
"published" : "2019-05-23T09:26:20Z",
"aliases" : [ ],
"summary" : "Cross-Site Scripting in webpack-bundle-analyzer",
"details" : "Versions of `webpack-bundle-analyzer` prior to 3.3.2 are vulnerable to Cross-Site Scripting. The package uses `JSON.stringify()` without properly escaping input which may lead to Cross-Site Scripting.\n\n\n## Recommendation\n\nUpgrade to version 3.3.2 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "webpack-bundle-analyzer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/263"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/264"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack-contrib/webpack-bundle-analyzer/commit/20f2b4c553ee343f491faf63e39427fba9908c7c"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-WEBPACKBUNDLEANALYZER-174190"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/826"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-05-23T07:34:50Z",
"nvd_published_at" : null
}
}