CVE-2018-20406: Integer Overflow
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
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the vulnerability ID for this issue?
The vulnerability ID for this issue is CVE-2018-20406.
What is the severity of CVE-2018-20406?
The severity of CVE-2018-20406 is high with a severity value of 7.5.
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.
How can I fix CVE-2018-20406?
To fix CVE-2018-20406, you should update to Python version 3.7.1 or higher.
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).