CVE-2020-10108: Twisted Improper Input Validation Vulnerability

CRITICAL
Advisory Identifier: GHSA-h96w-mmrf-2h6v
CVSS 9.8
CWE-444 CWE-20
Published
Advisory Summary

CVE-2020-10108 is a CRITICAL (CVSS 9.8) improper input validation vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Twisted libraries in the PyPI ecosystem. The issue involves improper input validation in twisted. Remediation is available by upgrading affected packages to version 20.3.0.

CVE-2020-10108 at a Glance

CVE Identifier CVE-2020-10108
GHSA Identifier GHSA-h96w-mmrf-2h6v
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Twisted
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-10108

To remediate this vulnerability, upgrade all affected Twisted dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Twisted fixed: 20.3.0
pip install Twisted>=20.3.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Twisted

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2020-10108, inspect your installed packages using pip:

pip show Twisted

Analyze the terminal output to locate any version of Twisted in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 20.3.0), your application is affected.

Note: The pip show Twisted command checks currently installed packages in your active Python environment.

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 Twisted, 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

In Twisted Web before 20.3.0, there was an HTTP request splitting vulnerability. When presented with two content-length headers, it ignored the first header. When the second content-length value was set to zero, the request body was interpreted as a pipelined request.

CVE-2020-10108 Affected Twisted Versions

1 component(s)
Fixed Versions:
20.3.0
Product / Package Ecosystem Affected Versions Fixed Version
Twisted
PyPI
< 20.3.0
20.3.0

References

NVD — CVE-2020-10108 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-10108
Security Fix Commit FIX COMMIT
https://github.com/twisted/twisted/commit/4a7d22e490bb8ff836892cc99a1f54b85ccb0281
Twisted Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/twisted/PYSEC-2020-259.yaml
Twisted Source Repository REPOSITORY
https://github.com/twisted/twisted
Twisted Source Repository REPOSITORY
https://github.com/twisted/twisted/blob/6ff2c40e42416c83203422ff70dfc49d2681c8e2/NEWS.rst#twisted-2030-2020-03-13
know.bishopfox.com/advisories WEB
https://know.bishopfox.com/advisories
know.bishopfox.com/advisories/twisted-... WEB
https://know.bishopfox.com/advisories/twisted-version-19.10.0
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2022/02/msg00021.html
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6ISMZFZBWW4EV6ETJGXAYIXN3AT7GBPL
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YW3NIL7VXSGJND2Q4BSXM3CFTAFU6T7D
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6ISMZFZBWW4EV6ETJGXAYIXN3AT7GBPL
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YW3NIL7VXSGJND2Q4BSXM3CFTAFU6T7D
Twisted Security Information SECURITY
https://security.gentoo.org/glsa/202007-24
usn.ubuntu.com/4308-1 WEB
https://usn.ubuntu.com/4308-1
usn.ubuntu.com/4308-2 WEB
https://usn.ubuntu.com/4308-2
Twisted Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2020.html

Frequently Asked Questions

What is CVE-2020-10108?
CVE-2020-10108 is a security vulnerability in Twisted involving Improper Input Validation in Twisted under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Twisted versions are affected?
Affected versions include releases prior to 20.3.0 across affected packages: Twisted.
What version fixes CVE-2020-10108?
Upgrading to 20.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Twisted affected?
Yes, Twisted is affected in releases prior to 20.3.0. Upgrade your dependency to 20.3.0 or later.
What is the CVSS score of CVE-2020-10108?
CVE-2020-10108 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-10108?
CVE-2020-10108 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 PyPI dependencies for CVE-2020-10108?
Run the dependency tree command: 'pip show Twisted'. 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-h96w-mmrf-2h6v",
  "modified" : "2024-11-25T18:33:22Z",
  "published" : "2020-03-31T15:42:42Z",
  "aliases" : [ "CVE-2020-10108" ],
  "summary" : "Improper Input Validation in Twisted",
  "details" : "In Twisted Web before 20.3.0, there was an HTTP request splitting vulnerability. When presented with two content-length headers, it ignored the first header. When the second content-length value was set to zero, the request body was interpreted as a pipelined request.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Twisted"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "20.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-10108"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/twisted/twisted/commit/4a7d22e490bb8ff836892cc99a1f54b85ccb0281"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/twisted/PYSEC-2020-259.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/twisted/twisted"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/twisted/twisted/blob/6ff2c40e42416c83203422ff70dfc49d2681c8e2/NEWS.rst#twisted-2030-2020-03-13"
  }, {
    "type" : "WEB",
    "url" : "https://know.bishopfox.com/advisories"
  }, {
    "type" : "WEB",
    "url" : "https://know.bishopfox.com/advisories/twisted-version-19.10.0"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2022/02/msg00021.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6ISMZFZBWW4EV6ETJGXAYIXN3AT7GBPL"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YW3NIL7VXSGJND2Q4BSXM3CFTAFU6T7D"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6ISMZFZBWW4EV6ETJGXAYIXN3AT7GBPL"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YW3NIL7VXSGJND2Q4BSXM3CFTAFU6T7D"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202007-24"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4308-1"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4308-2"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-444" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-31T15:28:25Z",
    "nvd_published_at" : "2020-03-12T13:15:00Z"
  }
}