CVE-2018-20406
No exploitation reported by the sources we read.
- Published2018-12-23
- Fixed in3.7.1
- WeaknessCWE-190
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2018-12-2323:29CVE publishedNVD
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.x | ≥ 3.4.0, < 3.7.1 | 3.7.1 | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 28.x | = 28 | no fix published | NVD |
| 29.x | = 29 | no fix published | NVD |
| 30.x | = 30 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 8.0 | = 8.0 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- firefox-atkSUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 2.26.1-2.8.4
- firefox-cairoSUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 1.15.10-2.13.4
- firefox-gdk-pixbufSUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 2.36.11-2.8.4
- firefox-glib2SUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 2.54.3-2.14.7
- firefox-gtk3SUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 3.10.9-2.15.3
- firefox-harfbuzzSUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 1.7.5-2.7.4
- firefox-libffiSUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 3.2.1.git259-2.3.3
- firefox-libffi-gcc5SUSE:Linux Enterprise Server 11 SP4-LTSSall versions · fixed in 5.3.1+r233831-14.1
55 more package ranges on OSV.dev
Vendor advisories
python: Integer overflow in Modules/_pickle.c allows for memory exhaustion if serializing gigabytes of data
rh-python35-python as a component of Red Hat Software Collections · rh-python35-python-debug as a component of Red Hat Software Collections · rh-python35-python-devel as a component of Red Hat Software Collections · +5 more
Red Hat Security Advisory: rh-python36-python security, bug fix, and enhancement update
Fix
- Update Python to 3.7.1
- Vendor fix Red Hat Product Security RHSA-2019:3725 · 152 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- No fix available, says the vendor Red Hat Product Security CVE-2018-20406 · 8 productsFix deferred
Advisories and patches
- bugs.python.orgPatch · Vendor Advisory
- github.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-04
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2026-10-15
- NVDCVSS 3.07.5read 2026-10-23
- NVDCVSS 2.05read 2026-10-23
- NVDweakness (CWE)CWE-190read 2026-10-23
- FIRST EPSSEPSS score5.8 %2026-12-04
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- EUVD-2018-12964same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-p5h6-p5x2-5qxfsame flawGitHub Advisory Database · CC-BY-4.0
- DLA-1663-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-2280-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2019-0135advisory covering several CVEsMageia · LicenseRef-unstated
- openSUSE-SU-2019:0155-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2020:0086-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11284-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2019:3725advisory covering several CVEsRed Hat · CC-BY-4.0
- SUSE-SU-2019:0215-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2019:0243-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2019:0243-2advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2019:14246-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2020:0114-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4127-1advisory covering several CVEsUbuntu
- USN-4127-2advisory covering several CVEsUbuntu
- USN-6891-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 vector
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Published
- 2018-12-23
- Last modified
- 2026-10-15
- NVD status
- Modified
- GitHub advisory
- GHSA-p5h6-p5x2-5qxf
Frequently asked questions
What is CVE-2018-20406?
Is CVE-2018-20406 actively exploited?
What is the CVSS score for CVE-2018-20406?
Running Python? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-p5h6-p5x2-5qxf
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0