Skip to main content
← All vulnerabilities
CVE-2021-3177BIT-LIBPYTHON-2021-3177BIT-PYTHON-2021-3177BIT-PYTHON-MIN-2021-3177PSF-2021-3

Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Pyth

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.6.13, 3.7.10, 3.8.8, 3.9.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

Summary

Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept floating-point numbers as untrusted input, as demonstrated by a 1e300 argument to c_double.from_param. This occurs because sprintf is used unsafely.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • libpythonBitnami

    fixed in 3.6.13; From 3.7.0 · fixed in 3.7.10; From 3.8.0 · fixed in 3.8.8; From 3.9.0 · fixed in 3.9.2

  • pythonBitnami

    fixed in 3.6.13; From 3.7.0 · fixed in 3.7.10; From 3.8.0 · fixed in 3.8.8; From 3.9.0 · fixed in 3.9.2

  • python-minBitnami

    fixed in 3.6.13; From 3.7.0 · fixed in 3.7.10; From 3.8.0 · fixed in 3.8.8; From 3.9.0 · fixed in 3.9.2

References 25

bugs.python.org

GitHub · python/cpython

python-security.readthedocs.io

lists.fedoraproject.org

security.gentoo.org

lists.apache.org

lists.debian.org

oracle.com

news.ycombinator.com

security.netapp.com