Vulnerabilities in pkg:maven/io.ktor/ktor-client-cio

PACKAGE
Advisory Identifier: GHSA-xrr9-rh8p-433v
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/io.ktor/ktor-client-cio

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/io.ktor/ktor-client-cio. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xrr9-rh8p-433v CVE-2020-5207 LOW Request smuggling is possible when both chunked TE and content length specified

CVE-2020-5207 at a Glance

CVE Identifier CVE-2020-5207
GHSA Identifier GHSA-xrr9-rh8p-433v
Severity LOW
CVSS v3.1 Base Score 5.4
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Ktor client cio
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

io.ktor:ktor-client-cio fixed: 1.3.0
<dependency>
    <groupId>io.ktor</groupId>
    <artifactId>ktor-client-cio</artifactId>
    <version>1.3.0</version>
</dependency>
io.ktor:ktor-server-cio fixed: 1.3.0
<dependency>
    <groupId>io.ktor</groupId>
    <artifactId>ktor-server-cio</artifactId>
    <version>1.3.0</version>
</dependency>
Verify Direct and Transitive Dependencies

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

### Impact Request 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. ### Patches https://github.com/ktorio/ktor/pull/1547 ### Workarounds None except migrating to a better proxy. ### References https://portswigger.net/web-security/request-smuggling https://tools.ietf.org/html/rfc7230#section-9.5

CVE-2020-5207 Affected Ktor client cio Versions

2 component(s)
Fixed Versions:
1.3.0
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?
CVE-2020-5207 is a security vulnerability in Ktor client cio involving Request smuggling is possible when both chunked TE and content length specified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Ktor client cio versions are affected?
Affected versions include releases prior to 1.3.0 across affected packages: io.ktor:ktor-client-cio, io.ktor:ktor-server-cio.
What version fixes CVE-2020-5207?
Upgrading to 1.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ktor-client-cio affected?
Yes, io.ktor:ktor-client-cio is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
Is ktor-server-cio affected?
Yes, io.ktor:ktor-server-cio is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
What is the CVSS score of CVE-2020-5207?
CVE-2020-5207 has a CVSS v3.1 base score of 5.4 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2020-5207?
CVE-2020-5207 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (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.).
How can I check Maven dependencies for CVE-2020-5207?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=io.ktor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}