CVE & CISA-KEV Catalog

CVE-2021-3177

CRITICALEPSS 98th pctl
9.8
CVSS v3
NVD

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.

How to fix

Remediation Available
python2.7Debian
Fixed in:2.7.18-2CVE-2021-3177
python2.7Ubuntu
Fixed in:2.7.6-8ubuntu0.6+esm10USN-4754-5
Fixed in:2.7.6-8ubuntu0.6+esm8USN-4754-1
Fixed in:2.7.12-1ubuntu0~16.04.14USN-4754-1
Fixed in:2.7.12-1ubuntu0~16.04.18USN-4754-4
Fixed in:2.7.17-1~18.04ubuntu1.3USN-4754-1
Fixed in:2.7.17-1~18.04ubuntu1.6USN-4754-4
Fixed in:2.7.18-1~20.04.1USN-4754-3
python2.7-minimalUbuntu
Fixed in:2.7.6-8ubuntu0.6+esm10USN-4754-5
Fixed in:2.7.6-8ubuntu0.6+esm8USN-4754-1
Fixed in:2.7.12-1ubuntu0~16.04.14USN-4754-1
Fixed in:2.7.12-1ubuntu0~16.04.18USN-4754-4
Fixed in:2.7.17-1~18.04ubuntu1.3USN-4754-1
Fixed in:2.7.17-1~18.04ubuntu1.6USN-4754-4
Fixed in:2.7.18-1~20.04.1USN-4754-3
python3.10Ubuntu
Fixed in:3.10.12-1~22.04.4USN-6891-1
python3.10-minimalUbuntu
Fixed in:3.10.12-1~22.04.4USN-6891-1
python3.11Ubuntu
Fixed in:3.11.0~rc1-1~22.04.1~esm1USN-6891-1
Fixed in:3.11.6-3ubuntu0.1USN-6891-1
python3.11-minimalUbuntu
Fixed in:3.11.0~rc1-1~22.04.1~esm1USN-6891-1
Fixed in:3.11.6-3ubuntu0.1USN-6891-1
python3.12Ubuntu
Fixed in:3.12.0-1ubuntu0.1USN-6891-1
python3.12-minimalUbuntu
Fixed in:3.12.0-1ubuntu0.1USN-6891-1
python3.4Ubuntu
Fixed in:3.4.3-1ubuntu1~14.04.7+esm10USN-4754-1
python3.4-minimalUbuntu
Fixed in:3.4.3-1ubuntu1~14.04.7+esm10USN-4754-1
python3.5Ubuntu
Fixed in:3.5.2-2ubuntu0~16.04.4~14.04.1+esm1USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.13+esm13USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.13USN-4754-1
python3.5-minimalUbuntu
Fixed in:3.5.2-2ubuntu0~16.04.4~14.04.1+esm1USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.13USN-4754-1
Fixed in:3.5.2-2ubuntu0~16.04.13+esm13USN-6891-1
python3.6Ubuntu
Fixed in:3.6.9-1~18.04ubuntu1.4USN-4754-1
Fixed in:3.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
python3.6-minimalUbuntu
Fixed in:3.6.9-1~18.04ubuntu1.4USN-4754-1
Fixed in:3.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
python3.7Ubuntu
Fixed in:3.7.5-2~18.04.4USN-4754-3
Fixed in:3.7.5-2ubuntu1~18.04.2+esm3USN-6891-1
python3.7-minimalUbuntu
Fixed in:3.7.5-2ubuntu1~18.04.2+esm3USN-6891-1
Fixed in:3.7.5-2~18.04.4USN-4754-3
python3.8Ubuntu
Fixed in:3.8.0-3~18.04.1USN-4754-3
Fixed in:3.8.0-3ubuntu1~18.04.2+esm2USN-6891-1
Fixed in:3.8.10-0ubuntu1~20.04.10USN-6891-1
Fixed in:3.8.5-1~20.04.2USN-4754-1
python3.8-minimalUbuntu
Fixed in:3.8.0-3ubuntu1~18.04.2+esm2USN-6891-1
Fixed in:3.8.0-3~18.04.1USN-4754-3
Fixed in:3.8.5-1~20.04.2USN-4754-1
Fixed in:3.8.10-0ubuntu1~20.04.10USN-6891-1
python3.9Ubuntu
Fixed in:3.9.5-3ubuntu0~20.04.1+esm2USN-6891-1
python3.9-minimalUbuntu
Fixed in:3.9.5-3ubuntu0~20.04.1+esm2USN-6891-1

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploit Intelligence

23.29%probability of exploitation in 30 days
98thpercentile

Very high risk: more likely to be exploited than 98% of all known CVEs.

References

Related Vulnerabilities

Other CWE-120 (Classic Buffer Overflow) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2014-0195Medium6.8100%-Fix
CVE-2017-7269Critical9.8100%KEV-
CVE-2019-11043High8.799%KEV + RansomFix
CVE-2011-4862High10.095%-Fix
CVE-2007-5659High7.894%KEVFix
CVE-2022-3786High7.592%-Fix

Common questions

How do I fix CVE-2021-3177?

Published advisories record a fix for 21 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2021-3177 being actively exploited?

Not that we know of. CVE-2021-3177 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 23.3% is the estimated probability that it will be exploited in the next 30 days. That is higher than 98% of all scored CVEs.

How severe is CVE-2021-3177?

CVE-2021-3177 has a CVSS v3 base score of 9.8, rated critical. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2021-3177 affect?

Published advisories record a fix for python2.7 (Debian), python2.7 (Ubuntu), python2.7-minimal (Ubuntu), python3.10 (Ubuntu), and 17 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2021-3177
CVE-2021-3177 severity badge

Markdown

[![CVE-2021-3177](https://tridentstack.com/cve/badge/CVE-2021-3177.svg)](https://tridentstack.com/cve/CVE-2021-3177)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-3177"><img src="https://tridentstack.com/cve/badge/CVE-2021-3177.svg" alt="CVE-2021-3177"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

See how it worksStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-12-18.