CVE-2021-3177
Last modified
CVE-2021-3177 is a critical-severity vulnerability rated 9.8/10 on the CVSS scale. 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.. EPSS estimates a 23.29% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Python | Python | >= 3.6.0, <= 3.6.12 |
| Python | Python | >= 3.7.0, <= 3.7.9 |
| Python | Python | >= 3.8.0, <= 3.8.7 |
| Python | Python | >= 3.9.0, <= 3.9.1 |
| Fedoraproject | Fedora | 32 |
| Fedoraproject | Fedora | 33 |
| Netapp | Active Iq Unified Manager | All versions |
| Netapp | Ontap Select Deploy Administration Utility | All versions |
| Debian | Debian Linux | 9.0 |
| Oracle | Communications Cloud Native Core Network Function Cloud Native Environment | 22.2.0 |
| Oracle | Communications Offline Mediation Controller | 12.0.0.3.0 |
| Oracle | Communications Pricing Design Center | 12.0.0.3.0 |
| Oracle | Enterprise Manager Ops Center | 12.4.0.0 |
| Oracle | Zfs Storage Appliance Kit | 8.8 |
References
- https://bugs.python.org/issue42938Exploit, Issue Tracking, Patch, Vendor Advisory
- https://github.com/python/cpython/pull/24239Patch, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/04/msg00005.htmlMailing List, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2022/02/msg00013.htmlMailing List, Third Party Advisory
- https://news.ycombinator.com/item?id=26185005Third Party Advisory
- https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.htmlPatch, Third Party Advisory
- https://security.gentoo.org/glsa/202101-18Third Party Advisory
- https://security.netapp.com/advisory/ntap-20210226-0003/Third Party Advisory
- https://www.oracle.com//security-alerts/cpujul2021.htmlPatch, Third Party Advisory
- https://www.oracle.com/security-alerts/cpujan2022.htmlPatch, Third Party Advisory
- https://www.oracle.com/security-alerts/cpujul2022.htmlPatch, Third Party Advisory
- https://www.oracle.com/security-alerts/cpuoct2021.htmlPatch, Third Party Advisory
- https://bugs.python.org/issue42938Exploit, Issue Tracking, Patch, Vendor Advisory
- https://github.com/python/cpython/pull/24239Patch, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/04/msg00005.htmlMailing List, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2022/02/msg00013.htmlMailing List, Third Party Advisory
- https://news.ycombinator.com/item?id=26185005Third Party Advisory
- https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.htmlPatch, Third Party Advisory
- https://security.gentoo.org/glsa/202101-18Third Party Advisory
- https://security.netapp.com/advisory/ntap-20210226-0003/Third Party Advisory
- https://www.oracle.com//security-alerts/cpujul2021.htmlPatch, Third Party Advisory
- https://www.oracle.com/security-alerts/cpujan2022.htmlPatch, Third Party Advisory
- https://www.oracle.com/security-alerts/cpujul2022.htmlPatch, Third Party Advisory
- https://www.oracle.com/security-alerts/cpuoct2021.htmlPatch, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2021-3177?
How severe is CVE-2021-3177?
How do I fix CVE-2021-3177?
Are you affected by CVE-2021-3177?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
