Original description
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.
Affected software
- Python ≥ 3.9.0 ≤ 3.9.1≥ 3.8.0 ≤ 3.8.7≥ 3.6.0 ≤ 3.6.12≥ 3.7.0 ≤ 3.7.9 exact match
Details
- Published
- 2021-01-19
- Last modified
- 2026-10-14
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- EPSS (30-day exploit probability)
- 24.00% (percentile 98)
References
- cve.org/CVE-2021-3177
- nvd.nist.gov/vuln/detail/CVE-2021-3177
- bugs.python.org/issue42938
- github.com/python/cpython/pull/24239
- python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/N...
- security.gentoo.org/glsa/202101-18
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/N...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y...
Track these versions on your own servers
InfraGuard collects installed software versions from every server and flags the ones with known vulnerabilities. Self-hosted — nothing leaves your network.
This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE® is a registered trademark of The MITRE Corporation; CVE records are used under the CVE Program Terms of Use.