GHSA-cpgr-wmr9-qxv4 Cross-Site Scripting in serve
Attackers can execute arbitrary JavaScript in victims' browsers via malicious filenames, requiring an upgrade to the serve package.
- 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-cpgr-wmr9-qxv4?
GHSA-cpgr-wmr9-qxv4 is a cross-site scripting vulnerability in serve, published on 11 Sep 2020. 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 serve prior to 10.0.2 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize filenames, allowing attackers to execute arbitrary JavaScript in the victim's browser through files with names containing malicious code.
Recommendation
Upgrade to version 10.0.2 or later.
Which versions are affected by GHSA-cpgr-wmr9-qxv4?
2 open source packages ship an affected version, including serve.
| Package | Affected | Fixed in |
|---|---|---|
serve npm | All versions | 10.0.2 |
serve npm | All versions | 10.0.2 |
How do I fix GHSA-cpgr-wmr9-qxv4?
Upgrade serve to 10.0.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-cpgr-wmr9-qxv4 being exploited?
There is no known exploitation of GHSA-cpgr-wmr9-qxv4 in the wild and no public exploit code.