CVE-2020-5207: Ktor client cio Request Smuggling Is Possible When Vulnerability
LOWCVE-2020-5207 is a LOW (CVSS 5.4) request smuggling is possible when vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Ktor client cio libraries in the Maven ecosystem. The issue involves request smuggling is possible when both chunked te and content length specified. Remediation is available by upgrading affected packages to version 1.3.0.
CVE-2020-5207 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2020-5207
To remediate this vulnerability, upgrade all affected Ktor client cio 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>io.ktor</groupId>
<artifactId>ktor-client-cio</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-server-cio</artifactId>
<version>1.3.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.ktor
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2020-5207, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.ktor
Analyze the terminal output to locate any version of Ktor client cio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.ktor 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-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Ktor client cio, 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-5207 Affected Ktor client cio Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.ktor:ktor-client-cio
|
Maven |
< 1.3.0
|
1.3.0
|
|
io.ktor:ktor-server-cio
|
Maven |
< 1.3.0
|
1.3.0
|
References
Frequently Asked Questions
What is CVE-2020-5207?
Which Ktor client cio versions are affected?
What version fixes CVE-2020-5207?
Is ktor-client-cio affected?
Is ktor-server-cio affected?
What is the CVSS score of CVE-2020-5207?
What CWE is associated with CVE-2020-5207?
How can I check Maven dependencies for CVE-2020-5207?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xrr9-rh8p-433v",
"modified" : "2021-01-08T20:32:37Z",
"published" : "2020-01-27T19:28:40Z",
"aliases" : [ "CVE-2020-5207" ],
"summary" : "Request smuggling is possible when both chunked TE and content length specified",
"details" : "### Impact\nRequest smuggling is possible when running behind a proxy that doesn't handle Content-Length and Transfer-Encoding properly or doesn't handle alone \\n as a headers separator.\n\n### Patches\nhttps://github.com/ktorio/ktor/pull/1547\n\n### Workarounds\nNone except migrating to a better proxy.\n\n### References\nhttps://portswigger.net/web-security/request-smuggling\nhttps://tools.ietf.org/html/rfc7230#section-9.5",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.ktor:ktor-client-cio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "io.ktor:ktor-server-cio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ktorio/ktor/security/advisories/GHSA-xrr9-rh8p-433v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5207"
}, {
"type" : "WEB",
"url" : "https://github.com/ktorio/ktor/pull/1547"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-444" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-01-27T19:28:00Z",
"nvd_published_at" : null
}
}