Vulnerabilities in pkg:maven/org.nanohttpd/nanohttpd-nanolets
PACKAGECVE-2020-13697 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Nanohttpd nanolets libraries in the Maven ecosystem. The issue involves nanohttpd cross-site scripting vulnerability. Remediation is available in the latest vendor maintenance releases.
pkg:maven/org.nanohttpd/nanohttpd-nanolets
Vulnerability advisories affecting package pkg:maven/org.nanohttpd/nanohttpd-nanolets. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-pr5m-4w22-8483 | CVE-2020-13697 | MODERATE | NanoHTTPD Cross-site Scripting vulnerability |
CVE-2020-13697 at a Glance
How to Fix CVE-2020-13697
To remediate this vulnerability, upgrade all affected Nanohttpd nanolets dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.nanohttpd</groupId>
<artifactId>nanohttpd-nanolets</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.nanohttpd
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2020-13697, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.nanohttpd
Analyze the terminal output to locate any version of Nanohttpd nanolets in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.nanohttpd command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Nanohttpd nanolets, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-13697 Affected Nanohttpd nanolets Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.nanohttpd:nanohttpd-nanolets
|
Maven |
≤ 2.3.1
|
|
References
Frequently Asked Questions
What is CVE-2020-13697?
Which Nanohttpd nanolets versions are affected?
What version fixes CVE-2020-13697?
Is nanohttpd-nanolets affected?
What CWE is associated with CVE-2020-13697?
How can I check Maven dependencies for CVE-2020-13697?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pr5m-4w22-8483",
"modified" : "2023-09-12T16:37:20Z",
"published" : "2021-02-25T16:32:34Z",
"aliases" : [ "CVE-2020-13697" ],
"summary" : "NanoHTTPD Cross-site Scripting vulnerability",
"details" : "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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.nanohttpd:nanohttpd-nanolets"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-13697"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/NanoHttpd/nanohttpd"
}, {
"type" : "WEB",
"url" : "https://github.com/NanoHttpd/nanohttpd/blob/efb2ebf85a2b06f7c508aba9eaad5377e3a01e81/nanolets/pom.xml"
}, {
"type" : "WEB",
"url" : "https://github.com/NanoHttpd/nanohttpd/blob/efb2ebf85a2b06f7c508aba9eaad5377e3a01e81/nanolets/src/main/java/org/nanohttpd/router/RouterNanoHTTPD.java"
}, {
"type" : "WEB",
"url" : "https://www.vdoo.com/advisories/#CVE-2020-13697"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-02-24T07:10:37Z",
"nvd_published_at" : "2021-02-23T08:15:00Z"
}
}