CVE-2022-25847 Cross-site Scripting (XSS) in serve-lite
An attacker can execute arbitrary scripts in a victim's browser via unsanitized file names in directory listings served by serve-lite.
- 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
- None listed
What is CVE-2022-25847?
CVE-2022-25847 is a medium-severity cross-site scripting vulnerability in serve-lite, published on 25 Jan 2023. 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
All versions of the package serve-lite are vulnerable to Cross-site Scripting (XSS) because when it detects a request to a directory, it renders a file listing of all of its contents with links that include the actual file names without any sanitization or output encoding.
Weakness: CWE-79
Which versions are affected by CVE-2022-25847?
2 open source packages ship an affected version, including serve-lite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
serve-lite npm | All versions to 1.1.0 | None |
serve-lite npm | All versions to 1.1.0 | None |
Products include Serve-Lite Project Serve-Lite.
How do I fix CVE-2022-25847?
No fix has been published for CVE-2022-25847 yet. Limit exposure of the affected software until one is available.
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 CVE-2022-25847 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-25847 exists.
Other vulnerabilities in serve-lite
Sources
Also known as GHSA-j8x7-qcw4-xx85.