# CVE-2018-20406: Python 3.6 and 2 others: Modules/_pickle.c in Python before 3.7.1 has an integer overflow via a large LONG_BINPUT value that is…

CVE-2018-20406 is fixed in 10 products on 2 platforms, first by Python 3.7 3.7.1, released October 20, 2018. 2 other affected products have no fix yet. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2018-20406
- Priority: High
- CVSS: 7.5 (Low)
- EPSS: 0.0579
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Dec 22, 2018
- Vendor advisory: https://nvd.nist.gov/vuln/detail/CVE-2018-20406

## Description

Modules/_pickle.c in Python before 3.7.1 has an integer overflow via a large LONG_BINPUT 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Windows apps | Python 3.7 | 3.7.1 | [Python 3.7 3.7.1](https://patchblox.com/security/data/fix/windows-app/python.python.3.7-3.7.1.md) | Oct 20, 2018 |
| Linux | idle-python3.6 Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [idle-python3.6 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-idle-python3.6-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | libpython3.6 Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [libpython3.6 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libpython3.6-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | libpython3.6-minimal Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [libpython3.6-minimal 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libpython3.6-minimal-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | libpython3.6-stdlib Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [libpython3.6-stdlib 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libpython3.6-stdlib-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | libpython3.6-testsuite Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [libpython3.6-testsuite 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libpython3.6-testsuite-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | python3.6 Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [python3.6 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3.6-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | python3.6-examples Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [python3.6-examples 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3.6-examples-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | python3.6-minimal Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [python3.6-minimal 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3.6-minimal-3.6.7-1-18.04.md) | Dec 22, 2018 |
| Linux | python3.6-venv Ubuntu 18.04.6 LTS (bionic) | 3.6.7-1~18.04 | [python3.6-venv 3.6.7-1~18.04](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3.6-venv-3.6.7-1-18.04.md) | Dec 22, 2018 |

## No fix yet

| Platform | Product | Status |
|---|---|---|
| Windows apps | Python 3.5 | no-fix |
| Windows apps | Python 3.6 | no-fix |

---

Data as of 2026-11-07T18:46:35Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
