CWE
20
Advisory Published
Updated

CVE-2018-20852: Input Validation

First published: Wed Oct 31 2018(Updated: )

Python could allow a remote attacker to obtain sensitive information, caused by the failure to correctly validate the domain by http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py. By using a server with a hostname that has another valid hostname as a suffix, an attacker could exploit this vulnerability to obtain leaked existing cookies.

Credit: cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
redhat/python<0:2.7.5-88.el7
0:2.7.5-88.el7
redhat/python3<0:3.6.8-13.el7
0:3.6.8-13.el7
redhat/python3<0:3.6.8-23.el8
0:3.6.8-23.el8
redhat/rh-python36-python<0:3.6.9-2.el6
0:3.6.9-2.el6
redhat/python27-python<0:2.7.17-2.el6
0:2.7.17-2.el6
redhat/rh-python36-python<0:3.6.9-2.el7
0:3.6.9-2.el7
redhat/python27-python<0:2.7.17-2.el7
0:2.7.17-2.el7
Python Python>=2.0<=2.7.16
Python Python>=3.0.0<3.4.10
Python Python>=3.5.0<3.5.7
Python Python>=3.6.0<3.6.9
Python Python>=3.7.0<3.7.3
IBM ISAM<=9.0.7
IBM Security Verify Access<=10.0.0
ubuntu/python2.7<2.7.15-4ubuntu4~18.04.1
2.7.15-4ubuntu4~18.04.1
ubuntu/python2.7<2.7.16-2ubuntu0.1
2.7.16-2ubuntu0.1
ubuntu/python2.7<2.7.6-8ubuntu0.6+
2.7.6-8ubuntu0.6+
ubuntu/python2.7<2.7.16-3
2.7.16-3
ubuntu/python2.7<2.7.12-1ubuntu0~16.04.8
2.7.12-1ubuntu0~16.04.8
ubuntu/python3.4<3.4.3-1ubuntu1~14.04.7+
3.4.3-1ubuntu1~14.04.7+
ubuntu/python3.4<3.4.10
3.4.10
ubuntu/python3.5<3.5.7
3.5.7
ubuntu/python3.5<3.5.2-2ubuntu0~16.04.8
3.5.2-2ubuntu0~16.04.8
ubuntu/python3.6<3.6.8-1~18.04.2
3.6.8-1~18.04.2
ubuntu/python3.6<3.6.9
3.6.9
ubuntu/python3.7<3.7.3~
3.7.3~
redhat/Python<3.4.10
3.4.10
redhat/Python<3.5.7
3.5.7
redhat/Python<3.6.9
3.6.9
redhat/Python<3.7.3
3.7.3
debian/python2.7
2.7.16-2+deb10u1
2.7.16-2+deb10u4
2.7.18-8+deb11u1
debian/python3.7
3.7.3-2+deb10u3
3.7.3-2+deb10u7

Remedy

A potentially simple workaround in the absence of patch on affected versions is to set DomainStrict in the cookiepolicy that would make sure a literal match against domain. The disadvantage would be that cookie set on example.com would not be shared with subdomain which might break workflow.

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is CVE-2018-20852?

    CVE-2018-20852 is a vulnerability in Python before version 3.7.3 that allows an attacker to trick the cookiejar into sending existing cookies to the wrong server.

  • How severe is CVE-2018-20852?

    CVE-2018-20852 has a severity rating of 5.3 (Medium).

  • Which versions of Python are affected by CVE-2018-20852?

    Python versions before 3.7.3 are affected by CVE-2018-20852.

  • How can I fix CVE-2018-20852?

    To fix CVE-2018-20852, upgrade your Python version to 3.7.3 or later.

  • Where can I find more information about CVE-2018-20852?

    You can find more information about CVE-2018-20852 at the following references: [1] [2] [3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203