CVE-2020-13697 NanoHTTPD Cross-site Scripting vulnerability

Medium 6.1 Published Updated

Reflected XSS in NanoHTTPD allows attackers to execute arbitrary scripts in victims' browsers via unsanitized query string input in the default GET handler.

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-2020-13697?

CVE-2020-13697 is a medium-severity cross-site scripting vulnerability in n/a, published on 23 Feb 2021. 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

An issue was discovered in RouterNanoHTTPD.java in NanoHTTPD through 2.3.1. The GeneralHandler class implements a basic GET handler that prints debug information as an HTML page. Any web server that extends this class without implementing its own GET handler is vulnerable to reflected XSS, because the GeneralHandler GET handler prints user input passed through the query string without any sanitization.

Weakness: CWE-79

Which versions are affected by CVE-2020-13697?

2 open source packages ship an affected version, including org.nanohttpd:nanohttpd-nanolets. It affects 1 product.

PackageAffectedFixed in
org.nanohttpd:nanohttpd-nanolets MavenAll versions to 2.3.1None
org.nanohttpd:nanohttpd-nanolets MavenAll versions to 2.3.1None

Products include Nanohttpd Nanohttpd.

How do I fix CVE-2020-13697?

No fix has been published for CVE-2020-13697 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-2020-13697 being exploited?

There is no known exploitation of CVE-2020-13697 in the wild and no public exploit code.

Sources

Also known as GHSA-pr5m-4w22-8483.

Is CVE-2020-13697 in your software?

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

Check your SBOMs for free