CVE-2021-3177

9.8 CRITICAL
Published: January 19, 2021 Modified: December 18, 2025

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://bugs.python.org/issue42938
Source: cve@mitre.org
Exploit Issue Tracking Patch Vendor Advisory
https://github.com/python/cpython/pull/24239
Source: cve@mitre.org
Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html
Source: cve@mitre.org
Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html
Source: cve@mitre.org
Mailing List Third Party Advisory
https://news.ycombinator.com/item?id=26185005
Source: cve@mitre.org
Third Party Advisory
https://security.gentoo.org/glsa/202101-18
Source: cve@mitre.org
Third Party Advisory
https://security.netapp.com/advisory/ntap-20210226-0003/
Source: cve@mitre.org
Third Party Advisory
https://www.oracle.com//security-alerts/cpujul2021.html
Source: cve@mitre.org
Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html
Source: cve@mitre.org
Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html
Source: cve@mitre.org
Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpuoct2021.html
Source: cve@mitre.org
Patch Third Party Advisory
https://bugs.python.org/issue42938
Source: af854a3a-2127-422b-91ae-364da2661108
Exploit Issue Tracking Patch Vendor Advisory
https://github.com/python/cpython/pull/24239
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html
Source: af854a3a-2127-422b-91ae-364da2661108
Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html
Source: af854a3a-2127-422b-91ae-364da2661108
Mailing List Third Party Advisory
https://news.ycombinator.com/item?id=26185005
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://security.gentoo.org/glsa/202101-18
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://security.netapp.com/advisory/ntap-20210226-0003/
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://www.oracle.com//security-alerts/cpujul2021.html
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpuoct2021.html
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory

56 reference(s) from NVD

Quick Stats

CVSS v3 Score
9.8 / 10.0
EPSS (Exploit Probability)
0.1%
22th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

python fedoraproject netapp oracle debian