UBUNTU-CVE-2018-20852 (CVE-2018-20852)

Vulnerability from osv_ubuntu – Published: 2019-07-13 00:00 – Updated: 2026-10-08 16:31 – Source website
VLAI
Details

http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validate the domain: it can be tricked into sending existing cookies to the wrong server. An attacker may abuse this flaw by using a server with a hostname that has another valid hostname as a suffix (e.g., pythonicexample.com to steal cookies for example.com). When a program uses http.cookiejar.DefaultPolicy and tries to do an HTTP connection to an attacker-controlled server, existing cookies can be leaked to the attacker. This affects 2.x through 2.7.16, 3.x before 3.4.10, 3.5.x before 3.5.7, 3.6.x before 3.6.9, and 3.7.x before 3.7.3.


{
  "affected": [
    {
      "ecosystem_specific": {
        "availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
        "binaries": [
          {
            "binary_name": "idle-python2.7",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "libpython2.7",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "libpython2.7-minimal",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "libpython2.7-stdlib",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "libpython2.7-testsuite",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "python2.7",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "python2.7-examples",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          },
          {
            "binary_name": "python2.7-minimal",
            "binary_version": "2.7.6-8ubuntu0.6+esm2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:Pro:14.04:LTS",
        "name": "python2.7",
        "purl": "pkg:deb/ubuntu/python2.7@2.7.6-8ubuntu0.6+esm2?arch=source\u0026distro=trusty/esm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.7.6-8ubuntu0.6+esm2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.7.5-8ubuntu3",
        "2.7.5-8ubuntu4",
        "2.7.6-2",
        "2.7.6-2ubuntu1",
        "2.7.6-3",
        "2.7.6-3ubuntu1",
        "2.7.6-4",
        "2.7.6-4ubuntu1",
        "2.7.6-5",
        "2.7.6-7",
        "2.7.6-8",
        "2.7.6-8ubuntu0.2",
        "2.7.6-8ubuntu0.3",
        "2.7.6-8ubuntu0.4",
        "2.7.6-8ubuntu0.5"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
        "binaries": [
          {
            "binary_name": "idle-python3.4",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "libpython3.4",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "libpython3.4-minimal",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "libpython3.4-stdlib",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "libpython3.4-testsuite",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "python3.4",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "python3.4-examples",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "python3.4-minimal",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          },
          {
            "binary_name": "python3.4-venv",
            "binary_version": "3.4.3-1ubuntu1~14.04.7+esm2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:Pro:14.04:LTS",
        "name": "python3.4",
        "purl": "pkg:deb/ubuntu/python3.4@3.4.3-1ubuntu1~14.04.7+esm2?arch=source\u0026distro=trusty/esm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.4.3-1ubuntu1~14.04.7+esm2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.4~b1-0ubuntu3",
        "3.4~b1-4ubuntu4",
        "3.4~b1-4ubuntu6",
        "3.4~b1-5ubuntu2",
        "3.4~b2-1",
        "3.4~b3-1ubuntu1",
        "3.4~rc1-1build1",
        "3.4~rc2-1",
        "3.4~rc3-0ubuntu1",
        "3.4.0-1",
        "3.4.0-2ubuntu1",
        "3.4.0-2ubuntu1.1",
        "3.4.3-1ubuntu1~14.04.1",
        "3.4.3-1ubuntu1~14.04.3",
        "3.4.3-1ubuntu1~14.04.4",
        "3.4.3-1ubuntu1~14.04.5",
        "3.4.3-1ubuntu1~14.04.6",
        "3.4.3-1ubuntu1~14.04.7"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
        "binaries": [
          {
            "binary_name": "idle-python3.5",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "libpython3.5",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "libpython3.5-minimal",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "libpython3.5-stdlib",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "libpython3.5-testsuite",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "python3.5",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "python3.5-examples",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "python3.5-minimal",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          },
          {
            "binary_name": "python3.5-venv",
            "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:Pro:14.04:LTS",
        "name": "python3.5",
        "purl": "pkg:deb/ubuntu/python3.5@3.5.2-2ubuntu0~16.04.4~14.04.1+esm1?arch=source\u0026distro=trusty/esm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.5.2-2ubuntu0~16.04.4~14.04.1+esm1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.5.2-2ubuntu0~16.04.4~14.04.1"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "idle-python2.7",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython2.7",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython2.7-minimal",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython2.7-stdlib",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython2.7-testsuite",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "python2.7",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "python2.7-examples",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          },
          {
            "binary_name": "python2.7-minimal",
            "binary_version": "2.7.12-1ubuntu0~16.04.8"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:16.04:LTS",
        "name": "python2.7",
        "purl": "pkg:deb/ubuntu/python2.7@2.7.12-1ubuntu0~16.04.8?arch=source\u0026distro=xenial"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.7.12-1ubuntu0~16.04.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.7.10-4ubuntu1",
        "2.7.10-4ubuntu2",
        "2.7.11-2",
        "2.7.11-3",
        "2.7.11-4",
        "2.7.11-6",
        "2.7.11-7",
        "2.7.11-7ubuntu1",
        "2.7.12-1~16.04",
        "2.7.12-1ubuntu0~16.04.1",
        "2.7.12-1ubuntu0~16.04.2",
        "2.7.12-1ubuntu0~16.04.3",
        "2.7.12-1ubuntu0~16.04.4"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "idle-python3.5",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython3.5",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython3.5-minimal",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython3.5-stdlib",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "libpython3.5-testsuite",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "python3.5",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "python3.5-examples",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "python3.5-minimal",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          },
          {
            "binary_name": "python3.5-venv",
            "binary_version": "3.5.2-2ubuntu0~16.04.8"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:16.04:LTS",
        "name": "python3.5",
        "purl": "pkg:deb/ubuntu/python3.5@3.5.2-2ubuntu0~16.04.8?arch=source\u0026distro=xenial"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.5.2-2ubuntu0~16.04.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.5.0-3",
        "3.5.0-3ubuntu1",
        "3.5.1~rc1-2ubuntu1",
        "3.5.1-1",
        "3.5.1-2",
        "3.5.1-3",
        "3.5.1-5",
        "3.5.1-6ubuntu1",
        "3.5.1-6ubuntu2",
        "3.5.1-9ubuntu1",
        "3.5.1-10",
        "3.5.2-2~16.01",
        "3.5.2-2~16.04",
        "3.5.2-2ubuntu0~16.04.1",
        "3.5.2-2ubuntu0~16.04.2",
        "3.5.2-2ubuntu0~16.04.3",
        "3.5.2-2ubuntu0~16.04.4",
        "3.5.2-2ubuntu0~16.04.5"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "idle-python2.7",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "libpython2.7",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "libpython2.7-minimal",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "libpython2.7-stdlib",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "libpython2.7-testsuite",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "python2.7",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "python2.7-examples",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          },
          {
            "binary_name": "python2.7-minimal",
            "binary_version": "2.7.15-4ubuntu4~18.04.1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:18.04:LTS",
        "name": "python2.7",
        "purl": "pkg:deb/ubuntu/python2.7@2.7.15-4ubuntu4~18.04.1?arch=source\u0026distro=bionic"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.7.15-4ubuntu4~18.04.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.7.14-2ubuntu2",
        "2.7.14-4",
        "2.7.14-6",
        "2.7.14-7",
        "2.7.14-8",
        "2.7.15~rc1-1",
        "2.7.15~rc1-1ubuntu0.1",
        "2.7.15-4ubuntu4~18.04"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "idle-python3.6",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "libpython3.6",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "libpython3.6-minimal",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "libpython3.6-stdlib",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "libpython3.6-testsuite",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "python3.6",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "python3.6-examples",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "python3.6-minimal",
            "binary_version": "3.6.8-1~18.04.2"
          },
          {
            "binary_name": "python3.6-venv",
            "binary_version": "3.6.8-1~18.04.2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:18.04:LTS",
        "name": "python3.6",
        "purl": "pkg:deb/ubuntu/python3.6@3.6.8-1~18.04.2?arch=source\u0026distro=bionic"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.6.8-1~18.04.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.6.3-1ubuntu1",
        "3.6.4~rc1-1",
        "3.6.4~rc1-2",
        "3.6.4-1",
        "3.6.4-2",
        "3.6.4-3build1",
        "3.6.4-4",
        "3.6.5~rc1-1",
        "3.6.5-3",
        "3.6.6-1~18.04",
        "3.6.7-1~18.04",
        "3.6.8-1~18.04.1"
      ]
    }
  ],
  "aliases": [],
  "details": "http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validate the domain: it can be tricked into sending existing cookies to the wrong server. An attacker may abuse this flaw by using a server with a hostname that has another valid hostname as a suffix (e.g., pythonicexample.com to steal cookies for example.com). When a program uses http.cookiejar.DefaultPolicy and tries to do an HTTP connection to an attacker-controlled server, existing cookies can be leaked to the attacker. This affects 2.x through 2.7.16, 3.x before 3.4.10, 3.5.x before 3.5.7, 3.6.x before 3.6.9, and 3.7.x before 3.7.3.",
  "id": "UBUNTU-CVE-2018-20852",
  "modified": "2026-10-08T16:31:59Z",
  "published": "2019-07-13T00:00:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2018-20852"
    },
    {
      "type": "REPORT",
      "url": "https://python-security.readthedocs.io/vuln/cookie-domain-check.html"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-4127-1"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-4127-2"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2018-20852"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-6891-1"
    }
  ],
  "related": [
    "USN-4127-1",
    "USN-4127-2",
    "USN-6891-1"
  ],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2018-20852"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.