GHSA-xw79-hhv6-578c Cross-Site Scripting in serve
Attackers can execute arbitrary JavaScript in victims' browsers via unencoded user input in the serve static file server.
- 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-xw79-hhv6-578c?
GHSA-xw79-hhv6-578c 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 does not encode output, allowing attackers to execute arbitrary JavaScript in the victim's browser if user-supplied input is rendered.
Recommendation
Upgrade to version 10.0.2 or later.
Which versions are affected by GHSA-xw79-hhv6-578c?
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-xw79-hhv6-578c?
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-xw79-hhv6-578c being exploited?
There is no known exploitation of GHSA-xw79-hhv6-578c in the wild and no public exploit code.