CVE-2018-20406: Integer Overflow

Published Sep 21, 2018
·
Updated

Last updated 25 August 2025

Other sources

Modules/pickle.c in Python before 3.7.1 has an integer overflow via a large LONGBINPUT value that is mishandled during a "resize to twice the size" attempt. This issue might cause memory exhaustion, but is only relevant if the pickle format is used for serializing tens or hundreds of gigabytes of data.

Upstream Issue:

https://bugs.python.org/issue34656

Upstream Patch:

https://github.com/python/cpython/commit/a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd

Reference:

http://people.canonical.com/~ubuntu-security/cve/2018/CVE-2018-20406.html

Red Hat

Modules/pickle.c in Python before 3.7.1 has an integer overflow via a large LONGBINPUT value that is mishandled during a "resize to twice the size" attempt. This issue might cause memory exhaustion, but is only relevant if the pickle format is used for serializing tens or hundreds of gigabytes of data. This issue is fixed in: v3.4.10, v3.4.10rc1; v3.5.10, v3.5.10rc1, v3.5.7, v3.5.7rc1, v3.5.8, v3.5.8rc1, v3.5.8rc2, v3.5.9; v3.6.10, v3.6.10rc1, v3.6.11, v3.6.11rc1, v3.6.12, v3.6.7, v3.6.7rc1, v3.6.7rc2, v3.6.8, v3.6.8rc1, v3.6.9, v3.6.9rc1; v3.7.1, v3.7.1rc1, v3.7.1rc2, v3.7.2, v3.7.2rc1, v3.7.3, v3.7.3rc1, v3.7.4, v3.7.4rc1, v3.7.4rc2, v3.7.5, v3.7.5rc1, v3.7.6, v3.7.6rc1, v3.7.7, v3.7.7rc1, v3.7.8, v3.7.8rc1, v3.7.9.

Affected Software

9 affected componentsFixes available
redhat/rh-python36-python<0:3.6.9-2.el6
0:3.6.9-2.el6
redhat/rh-python36-python<0:3.6.9-2.el7
0:3.6.9-2.el7
debian/python2.7
2.7.18-8+deb11u1
redhat/python<3.7.1
3.7.1
Python Python>=3.4.0<3.7.1
Debian Debian Linux=8.0
Fedoraproject Fedora=28
Fedoraproject Fedora=29
Fedoraproject Fedora=30

Event History

Sep 21, 2018
CVE Published
12:00 AM
Dec 23, 2018
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·07:02 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·07:03 PM
Description

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID for this issue is CVE-2018-20406.

2

What is the severity of CVE-2018-20406?

The severity of CVE-2018-20406 is high with a severity value of 7.5.

3

Which software versions are affected by CVE-2018-20406?

The affected software versions are Python before 3.7.1 and certain versions of rh-python36-python, python2.7, python3.7, python3.5, python3.6, and python3.4.

4

How can I fix CVE-2018-20406?

To fix CVE-2018-20406, you should update to Python version 3.7.1 or higher.

5

Where can I find more information about CVE-2018-20406?

You can find more information about CVE-2018-20406 at the following references: [https://bugs.python.org/issue34656](https://bugs.python.org/issue34656), [https://github.com/python/cpython/commit/a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd](https://github.com/python/cpython/commit/a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd), [http://people.canonical.com/~ubuntu-security/cve/2018/CVE-2018-20406.html](http://people.canonical.com/~ubuntu-security/cve/2018/CVE-2018-20406.html).

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203