CVE-2021-3177CWE-120

CVE-2021-3177

Critical · published January 19, 2021

CVSS v3.1
9.8
EPSS
24%
Percentile
97.9
In the wild
Unconfirmed
What it is

🔥 A crafty floating-point number can open the door to remote code execution in Python 3.x up to version 3.9.1! Think of it like a waiter serving an oversized meal that spills all over the table — a buffer overflow can cause a chaotic mess where untrusted input overflows and takes control. If anyone can order that meal, you can bet they’ll push the limits! An attacker could exploit this vulnerability to execute arbitrary code on the server, posing a significant risk. This could lead to unauthorized access, data breaches, or even total system takeover, allowing the assailant to wreak havoc on your applications and servers!

Put simply

Think of it like a waiter serving an oversized meal that spills all over the table — a buffer overflow can cause a chaotic mess where untrusted input overflows and takes control. If anyone can order that meal, you can bet they’ll push the limits! This buffer overflow vulnerability occurs due to the unsafe use of the `sprintf` function in the PyCArg_repr method within the _ctypes module, allowing attackers to manipulate floating-point input and execute malicious code.

What to do

An attacker could exploit this vulnerability to execute arbitrary code on the server, posing a significant risk. This could lead to unauthorized access, data breaches, or even total system takeover, allowing the assailant to wreak havoc on your applications and servers! To mitigate this risk, immediately update to Python version 3.9.2 or later. Additionally, audit any applications that accept floating-point numbers from untrusted sources and apply input validation where possible. Don’t leave any spaces for attackers to exploit! You've got this! Follow these steps, and your Python applications will be safer than ever! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.24216 · 97.9th percentile
Weakness
CWE-120 · Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Published
2021-01-19T11:15Z
Affected products (15)
ProductVersionsFixed in
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/fedoraall versions—
fedoraproject/fedoraall versions—
netapp/active_iq_unified_managerall versions—
netapp/active_iq_unified_managerall versions—
netapp/ontap_select_deploy_administration_utilityall versions—
debian/debian_linuxall versions—
oracle/communications_cloud_native_core_network_function_cloud_native_environmentall versions—
oracle/communications_offline_mediation_controllerall versions—
oracle/communications_pricing_design_centerall versions—
oracle/enterprise_manager_ops_centerall versions—
oracle/zfs_storage_appliance_kitall versions—
References (57)
https://www.oracle.com/security-alerts/cpujul2022.html · [email protected]https://www.oracle.com/security-alerts/cpuoct2021.html · [email protected]https://bugs.python.org/issue42938 · af854a3a-2127-422b-91ae-364da2661108https://github.com/python/cpython/pull/24239 · af854a3a-2127-422b-91ae-364da2661108https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRHOCQYX3QLDGDQGTWQAUUT2GGIZCZUO/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CCFZMVRQUKCBQIG5F2CBVADK63NFSE4A/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FONHJIOZOFD7CD35KZL6SVBUTMBPGZGA/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FPE7SMXYUIWPOIZV4DQYXODRXMFX3C5E/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HCQTCSP6SCVIYNIRUJC5X7YBVUHPLSC4/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MGSV6BJQLRQ6RKVUXK7JGU7TP4QFGQXC/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MP572OLHMS7MZO4KUPSCIMSZIA5IZZ62/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NODWHDIFBQE5RU5PUWUVE47JOT5VCMJ2/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NQPARTLNSFQVMMQHPNBFOCOZOO3TMQNA/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXSMBHES3ANXXS2RSO5G6Q24BR4B2PWK/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6XJAULOS5JVB2L67NCKKMJ5NTKZJBSD/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y4KSYYWMGAKOA2JVCQA422OINT6CKQ7O/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YDTZVGSXQ7HR7OCGSUHTRNTMBG43OMKU/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z7GZV74KM72O2PEJN2C4XP3V5Q5MZUOO/ · af854a3a-2127-422b-91ae-364da2661108https://news.ycombinator.com/item?id=26185005 · af854a3a-2127-422b-91ae-364da2661108https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html · af854a3a-2127-422b-91ae-364da2661108https://security.gentoo.org/glsa/202101-18 · af854a3a-2127-422b-91ae-364da2661108https://security.netapp.com/advisory/ntap-20210226-0003/ · af854a3a-2127-422b-91ae-364da2661108https://www.oracle.com//security-alerts/cpujul2021.html · af854a3a-2127-422b-91ae-364da2661108https://www.oracle.com/security-alerts/cpujan2022.html · af854a3a-2127-422b-91ae-364da2661108https://www.oracle.com/security-alerts/cpujul2022.html · af854a3a-2127-422b-91ae-364da2661108https://www.oracle.com/security-alerts/cpuoct2021.html · af854a3a-2127-422b-91ae-364da2661108https://cert-portal.siemens.com/productcert/html/ssa-398330.html · 0b142b55-0307-4c5a-b3c9-f314f3fb7c5ehttps://bugs.python.org/issue42938 · [email protected]https://github.com/python/cpython/pull/24239 · [email protected]https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E · [email protected]https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html · [email protected]https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html · [email protected]https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRHOCQYX3QLDGDQGTWQAUUT2GGIZCZUO/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CCFZMVRQUKCBQIG5F2CBVADK63NFSE4A/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FONHJIOZOFD7CD35KZL6SVBUTMBPGZGA/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FPE7SMXYUIWPOIZV4DQYXODRXMFX3C5E/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HCQTCSP6SCVIYNIRUJC5X7YBVUHPLSC4/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MGSV6BJQLRQ6RKVUXK7JGU7TP4QFGQXC/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MP572OLHMS7MZO4KUPSCIMSZIA5IZZ62/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NODWHDIFBQE5RU5PUWUVE47JOT5VCMJ2/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NQPARTLNSFQVMMQHPNBFOCOZOO3TMQNA/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXSMBHES3ANXXS2RSO5G6Q24BR4B2PWK/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6XJAULOS5JVB2L67NCKKMJ5NTKZJBSD/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y4KSYYWMGAKOA2JVCQA422OINT6CKQ7O/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YDTZVGSXQ7HR7OCGSUHTRNTMBG43OMKU/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z7GZV74KM72O2PEJN2C4XP3V5Q5MZUOO/ · [email protected]https://news.ycombinator.com/item?id=26185005 · [email protected]https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html · [email protected]https://security.gentoo.org/glsa/202101-18 · [email protected]https://security.netapp.com/advisory/ntap-20210226-0003/ · [email protected]https://www.oracle.com//security-alerts/cpujul2021.html · [email protected]https://www.oracle.com/security-alerts/cpujan2022.html · [email protected]
EPSS history
Timeline
  • 19 JAN 00:00Z
    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…
    cvelistv5