Name | CVE-2018-20852 |
Description | 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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-1889-1, DLA-1906-1, DLA-2280-1, DLA-2337-1, ELA-158-1 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
python2.7 (PTS) | jessie, jessie (lts) | 2.7.9-2-ds1-1+deb8u12 | fixed |
stretch (security) | 2.7.13-2+deb9u6 | fixed | |
stretch (lts), stretch | 2.7.13-2+deb9u9 | fixed | |
buster (security), buster, buster (lts) | 2.7.16-2+deb10u4 | fixed | |
bullseye | 2.7.18-8+deb11u1 | fixed | |
python3.4 (PTS) | jessie, jessie (lts) | 3.4.2-1+deb8u18 | fixed |
python3.5 (PTS) | stretch (security) | 3.5.3-1+deb9u5 | fixed |
stretch (lts), stretch | 3.5.3-1+deb9u10 | fixed | |
python3.7 (PTS) | buster, buster (lts) | 3.7.3-2+deb10u8 | fixed |
buster (security) | 3.7.3-2+deb10u7 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
python2.7 | source | wheezy | 2.7.3-6+deb7u7 | ELA-158-1 | ||
python2.7 | source | jessie | 2.7.9-2+deb8u4 | DLA-1906-1 | ||
python2.7 | source | stretch | 2.7.13-2+deb9u4 | DLA-2337-1 | ||
python2.7 | source | buster | 2.7.16-2+deb10u1 | |||
python2.7 | source | (unstable) | 2.7.16-3 | |||
python3.4 | source | wheezy | (unfixed) | end-of-life | ||
python3.4 | source | jessie | 3.4.2-1+deb8u6 | DLA-1889-1 | ||
python3.4 | source | (unstable) | (unfixed) | |||
python3.5 | source | stretch | 3.5.3-1+deb9u2 | DLA-2280-1 | ||
python3.5 | source | (unstable) | (unfixed) | |||
python3.7 | source | (unstable) | 3.7.3~rc1-1 |
https://bugs.python.org/issue35121
https://python-security.readthedocs.io/vuln/cookie-domain-check.html
https://github.com/python/cpython/commit/979daae300916adb399ab5b51410b6ebd0888f13 (2.7.x branch)
https://github.com/python/cpython/commit/42ad4101d3ba7ca3c371dadf0f8880764c9f15fb (v3.4.10)
https://github.com/python/cpython/commit/4749f1b69000259e23b4cc6f63c542a9bdc62f1b (v3.5.7)
https://github.com/python/cpython/commit/b241af861b37e20ad30533bc0b7e2e5491cc470f (v3.6.9rc1)
https://github.com/python/cpython/commit/e5123d81ffb3be35a1b2767d6ced1a097aaf77be (v3.7.3rc1)