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?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2021
- CVE-2021-31758An issue was discovered on Tenda AC11 devices with firmware …9.8
- CVE-2021-3176The chat window of the Mitel BusinessCTI Enterprise (MBC-E) …8
- CVE-2021-31760Webmin 1.973 is affected by Cross Site Request Forgery (CSRF…8.8
- CVE-2021-31761Webmin 1.973 is affected by reflected Cross Site Scripting (…9.6
- CVE-2021-31762Webmin 1.973 is affected by Cross Site Request Forgery (CSRF…8.8
- CVE-2021-31769MyQ Server in MyQ X Smart before 8.2 allows remote code exec…8.8
- CVE-2021-31771Rejected reason: DO NOT USE THIS CANDIDATE NUMBER. ConsultID…
- CVE-2021-31776Aviatrix VPN Client before 2.14.14 on Windows has an unquote…7.8
- CVE-2021-31777The dce (aka Dynamic Content Element) extension 2.2.0 throug…4.9
- CVE-2021-31778The media2click (aka 2 Clicks for External Media) extension …5.4
- CVE-2021-31779The yoast_seo (aka Yoast SEO) extension before 7.2.1 for TYP…6.4
- CVE-2021-3178fs/nfsd/nfs3xdr.c in the Linux kernel through 5.10.8, when t…6.5
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
