CVE-2022-25847 Cross-site Scripting (XSS) in serve-lite

Medium 5.4 Published Updated

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.

PackageAffectedFixed in
serve-lite npmAll versions to 1.1.0None
serve-lite npmAll versions to 1.1.0None

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.

Sources

Also known as GHSA-j8x7-qcw4-xx85.

Is CVE-2022-25847 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free