GHSA-pgr8-jg6h-8gw6 Cross-Site Scripting in webpack-bundle-analyzer
An attacker can execute arbitrary scripts in the victim's browser via the webpack-bundle-analyzer interface, potentially compromising the developer's session.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-pgr8-jg6h-8gw6?
GHSA-pgr8-jg6h-8gw6 is a cross-site scripting vulnerability in webpack-bundle-analyzer, published on 23 May 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Recommendation
Upgrade to version 3.3.2 or later.
Which versions are affected by GHSA-pgr8-jg6h-8gw6?
2 open source packages ship an affected version, including webpack-bundle-analyzer.
| Package | Affected | Fixed in |
|---|---|---|
webpack-bundle-analyzer npm | All versions | 3.3.2 |
webpack-bundle-analyzer npm | All versions | 3.3.2 |
How do I fix GHSA-pgr8-jg6h-8gw6?
Upgrade webpack-bundle-analyzer to 3.3.2 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is GHSA-pgr8-jg6h-8gw6 being exploited?
There is no known exploitation of GHSA-pgr8-jg6h-8gw6 in the wild and no public exploit code.