Skip to content
Fencer Vulns
high 7.5

CVE-2018-20406 json

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…

published 2018-12-23 7 y ago modified 2026-10-15 24 d ago also EUVD-2018-12964

cvss
7.5
version 3.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
5.8%
EPSS 5.8% chance of exploitation in 30 days, percentile 93%
public exploits
0
none known

Summary

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.

Patch / fix

  • python python 3.7.1
  • python3.5 Ubuntu 16.04 LTS 3.5.2-2ubuntu0~16.04.8
  • python3.6 Ubuntu 18.04 LTS 3.6.7-1~18.04
  • python3.4 Ubuntu Pro 14.04 LTS 3.4.3-1ubuntu1~14.04.7+esm2
  • python3.5 Ubuntu Pro 14.04 LTS 3.5.2-2ubuntu0~16.04.4~14.04.1+esm1

ubuntu advisories UBUNTU-CVE-2018-20406

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-python36-python RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el6
  • rh-python36-python RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el7
  • rh-python36-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el6
  • rh-python36-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el7
  • rh-python36-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el6
  • rh-python36-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el7
  • rh-python36-python-tools RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el6
  • rh-python36-python-tools RHEL 3 SOFTWARE_COLLECTIONS 3.6.9-2.el7

red hat advisories RHSA-2019:3725

  • python3 SLE Module for Basesystem 15 SP1, SLE Module for Basesystem 15 3.6.10-3.42.2
  • python3-base SLE Module for Development Tools 15 SP1, SLE Module for Development Tools 15, SLE Module for Basesystem 15 SP1 +1 more 3.6.10-3.42.2
  • python3 SLES 12 SP4, SLES 12 SP3, SLES 12 SP2-BCL +13 more 3.4.6-25.21.1
  • python3-base SLES 12 SP4, SLES 12 SP3, SLES 12 SP2-BCL +14 more 3.4.6-25.21.1
  • python3 SLE Module for Basesystem 15 3.6.5-3.8.1
  • python3-base SLE Module for Development Tools 15, SLE Module for Basesystem 15 3.6.5-3.8.1
  • firefox-atk SLES 11 SP4-LTSS 2.26.1-2.8.4
  • mozilla-nss SLES 11 SP4-LTSS 3.45-38.9.3

suse advisories SUSE-SU-2019:14246-1SUSE-SU-2020:0114-1SUSE-SU-2019:0243-2SUSE-SU-2019:0243-1SUSE-SU-2019:0215-1

  • python36 openSUSE Tumbleweed 3.6.15-1.1
  • python3 openSUSE Leap 15.1 3.6.10-lp151.6.7.1
  • python3-base openSUSE Leap 15.1 3.6.10-lp151.6.7.1
  • python3 openSUSE Leap 15.0 3.6.5-lp150.2.6.1
  • python3-base openSUSE Leap 15.0 3.6.5-lp150.2.6.1

opensuse advisories openSUSE-SU-2024:11284-1openSUSE-SU-2020:0086-1openSUSE-SU-2019:0155-1

  • python3 Alpine 3.8, Alpine 3.7, Alpine 3.6 3.6.8-r0

alpine advisories ALPINE-CVE-2018-20406

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2018-20406 updated cvss 5.9

python: Integer overflow in Modules/_pickle.c allows for memory exhaustion if serializing gigabytes of data

  • Red Hat Software Collections rh-python35-python, rh-python35-python-libs, rh-python35-python-test, rh-python35-python-tools, rh-python35-python-tkinter
    affected: no fix available “Fix deferred”
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-python36-python 3.6.9-2.el6, rh-python36-python-libs 3.6.9-2.el6, rh-python36-python-test 3.6.9-2.el6, rh-python36-python-tools 3.6.9-2.el6, rh-python36-python-tkinter 3.6.9-2.el6 Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-python36-python 3.6.9-2.el7, rh-python36-python-libs 3.6.9-2.el7, rh-python36-python-test 3.6.9-2.el7, rh-python36-python-tools 3.6.9-2.el7, rh-python36-python-tkinter 3.6.9-2.el7 Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-python36-python 3.6.9-2.el7, rh-python36-python-libs 3.6.9-2.el7, rh-python36-python-test 3.6.9-2.el7, rh-python36-python-tools 3.6.9-2.el7, rh-python36-python-tkinter 3.6.9-2.el7 Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-python36-python 3.6.9-2.el7, rh-python36-python-libs 3.6.9-2.el7, rh-python36-python-test 3.6.9-2.el7, rh-python36-python-tools 3.6.9-2.el7, rh-python36-python-tkinter 3.6.9-2.el7 Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-python36-python 3.6.9-2.el7, rh-python36-python-libs 3.6.9-2.el7, rh-python36-python-test 3.6.9-2.el7, rh-python36-python-tools 3.6.9-2.el7, rh-python36-python-tkinter 3.6.9-2.el7 Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-python36-python 3.6.9-2.el6, rh-python36-python-libs 3.6.9-2.el6, rh-python36-python-test 3.6.9-2.el6, rh-python36-python-tools 3.6.9-2.el6, rh-python36-python-tkinter 3.6.9-2.el6
    +1 more products
    Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-python36-python 3.6.9-2.el7, rh-python36-python-libs 3.6.9-2.el7, rh-python36-python-test 3.6.9-2.el7, rh-python36-python-tools 3.6.9-2.el7, rh-python36-python-tkinter 3.6.9-2.el7
    fixed: vendor fix RHSA-2019:3725
  • Red Hat Enterprise Linux 5 python Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 8 scipy, python3, python36, python-nose, python-wheel, python3-bson, +25 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
24 d ago

Exploit prediction

5.79% chance of exploitation in the next 30 days, higher than 93% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugs.python.org https://bugs.python.org/issue34656 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.0 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

Weakness
  • CWE-190 Integer Overflow or Wraparound

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.