CVE-2021-3177Python 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…
- 9.8CriticalCVSS base score
- 24.0%Exploitation in 30 daysEPSS · top 2.1% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
Published
- 6 years later
· 6 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 24.0% · top 2.1% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: yes · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Affected products
n/a
- affected n/a
References
References29
- https://bugs.python.org/issue42938 (opens in a new tab)x_transferred
- https://github.com/python/cpython/pull/24239 (opens in a new tab)x_transferred
- https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html (opens in a new tab)x_transferred
- FEDORA-2021-faf88b9499 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-cc3ff94cfc (opens in a new tab)vendor-advisoryx_transferred
- GLSA-202101-18 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-e3a5a74610 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-ced31f3f0c (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-42ba9feb47 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-076a2dccba (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-851c6e4e2d (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-66547ff92d (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-17668e344a (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-d5cde50865 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-7547ad987f (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-f4fd9372c7 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-3352c1c802 (opens in a new tab)vendor-advisoryx_transferred
- [mina-dev] 20210225 [jira] [Created] (FTPSERVER-500) Security vulnerability in common/lib/log4j-1.2.17.jar (opens in a new tab)mailing-listx_transferred
- FEDORA-2021-907f3bacae (opens in a new tab)vendor-advisoryx_transferred
- [debian-lts-announce] 20210405 [SECURITY] [DLA 2619-1] python3.5 security update (opens in a new tab)mailing-listx_transferred
- https://www.oracle.com//security-alerts/cpujul2021.html (opens in a new tab)x_transferred
- https://news.ycombinator.com/item?id=26185005 (opens in a new tab)x_transferred
- https://security.netapp.com/advisory/ntap-20210226-0003/ (opens in a new tab)x_transferred
- https://www.oracle.com/security-alerts/cpuoct2021.html (opens in a new tab)x_transferred
- https://www.oracle.com/security-alerts/cpujan2022.html (opens in a new tab)x_transferred
- [debian-lts-announce] 20220212 [SECURITY] [DLA 2919-1] python2.7 security update (opens in a new tab)mailing-listx_transferred
- https://www.oracle.com/security-alerts/cpujul2022.html (opens in a new tab)x_transferred
- [debian-lts-announce] 20230524 [SECURITY] [DLA 3432-1] python2.7 security update (opens in a new tab)mailing-listx_transferred
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-26520 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-3177)Record last updated .