CVE-2021-3177
A public proof of concept exists; no exploitation attested.
- Published2021-01-19
- WeaknessCWE-120
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2021-01-1906:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.6 | ≥ 3.6.0, ≤ 3.6.12 | no fix published | NVD |
| 3.7 | ≥ 3.7.0, ≤ 3.7.9 | no fix published | NVD |
| 3.8 | ≥ 3.8.0, ≤ 3.8.7 | no fix published | NVD |
| 3.9 | ≥ 3.9.0, ≤ 3.9.1 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.9 | ≥ 3.9.0, < 3.9.2 | 3.9.2 | OSV |
| 3.8 | ≥ 3.8.0, < 3.8.8 | 3.8.8 | OSV |
| 3.7 | ≥ 3.7.0, < 3.7.10 | 3.7.10 | OSV |
| 3.6 | < 3.6.13 | 3.6.13 | OSV |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.9 | ≥ 3.9.0, < 3.9.2 | 3.9.2 | OSV |
| 3.8 | ≥ 3.8.0, < 3.8.8 | 3.8.8 | OSV |
| 3.7 | ≥ 3.7.0, < 3.7.10 | 3.7.10 | OSV |
| 3.6 | < 3.6.13 | 3.6.13 | OSV |
10 more products in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- babelRocky Linux:8all versions · fixed in 0:2.5.1-9.module+el8.4.0+403+9ae17a31
- babelRocky Linux:8all versions · fixed in 0:2.7.0-10.module+el8.4.0+570+c2eaf144
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.5.1-9.module+el8.1.0+3111+de3f2d8eand 1 other package
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.7.0-10.module+el8.4.0+8888+89bc7e79and 1 other package
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.4.0+403+9ae17a31
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.5.0+706+735ec4b3
- CythonRocky Linux:8all versions · fixed in 0:0.29.14-4.module+el8.4.0+570+c2eaf144
- CythonRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:0.28.1-7.module+el8.1.0+3111+de3f2d8eand 3 other packages
344 more package ranges on OSV.dev
Vendor advisories
python: Stack-based buffer overflow in PyCArg_repr in _ctypes/callproc.c
python.src as a component of Red Hat Enterprise Linux 5 · python as a component of Red Hat Enterprise Linux 6 · python-devel as a component of Red Hat Enterprise Linux 6 · +14 more
Siemens SIMATIC S7-1500
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) · +2 more
SSA-398330: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP >= V3.1.0 and < V3.1.5
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.0 < V3.1.5 · +2 more
Red Hat Security Advisory: python security update
Red Hat Security Advisory: python27 security update
Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update
3 more advisories
Fix
- Vendor fix Siemens ProductCERT SSA-398330 · 1 productUpdate to V3.1.5 or later version
- Vendor fix CISA ICSA-23-348-10 · 5 productsUpdate to V3.1.5 or later version
- Vendor fix Red Hat Product Security RHSA-2022:5235 · 72 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- Mitigation from the vendor CISA ICSA-23-348-10 · 5 productsOnly build and run applications from trusted sources.
- No fix available, says the vendor Red Hat Product Security CVE-2021-3177 · 1 productAffected
- No fix planned, says the vendor Red Hat Product Security CVE-2021-3177 · 16 productsOut of support scope
Advisories and patches
- bugs.python.orgPatch · Vendor Advisory
- github.comPatch
- python-security.readthedocs.ioPatch
- www.oracle.comPatch
- www.oracle.comPatch
- www.oracle.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- CISA-ADP (SSVC)PoC stated2025-12-18
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionpoc2025-12-18
- CISA-ADPCVSS 3.19.82025-12-18
- NVDCVSS 3.19.8read 2026-10-23
- NVDCVSS 2.07.5read 2026-10-23
- CISA-ADPweakness (CWE)CWE-1202025-12-18
- NVDweakness (CWE)CWE-120read 2026-10-23
- FIRST EPSSEPSS score24.0 %read 2026-11-09
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- BIT-libpython-2021-3177same flawBitnami · Apache-2.0
- BIT-python-2021-3177same flawBitnami · Apache-2.0
- BIT-python-min-2021-3177same flawBitnami · Apache-2.0
- EUVD-2021-26520same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-hc96-xw56-vfwhsame flawGitHub Advisory Database · CC-BY-4.0
- PSF-2021-3same flawPython Software Foundation · CC-BY-4.0
- ALSA-2021:1761advisory covering several CVEsAlmaLinux · MIT
- ALSA-2021:1879advisory covering several CVEsAlmaLinux · MIT
- DLA-2619-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-2919-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-3432-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0064advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1036advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2021-1066advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2021:0270-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:0331-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11202-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11283-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11284-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11285-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11286-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:12089-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:12910-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:14109-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:14434-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2025:15713-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:1633advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:1761advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:1879advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:3252advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:3254advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:5235advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2021:1761advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2021:1879advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2021:0355-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0428-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0432-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0529-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4754-1advisory covering several CVEsUbuntu
- USN-4754-3advisory covering several CVEsUbuntu
- USN-4754-4advisory covering several CVEsUbuntu
- USN-4754-5advisory covering several CVEsUbuntu
- USN-6891-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2021-01-19
- Last Modified
- 2026-10-14
- NVD status
- Modified
- GitHub Advisory
- GHSA-hc96-xw56-vfwh
Frequently asked questions
What is CVE-2021-3177?
Is CVE-2021-3177 actively exploited?
What is the CVSS score for CVE-2021-3177?
Running Python? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CISA ICS advisories (CSAF) · Public domain (US Government work)
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-hc96-xw56-vfwh
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- Siemens ProductCERT (CSAF) · TLP:WHITE (commercial use and redistribution granted)
- CISA Vulnrichment · CC0-1.0