{"id":"CVE-2021-3177","published":"2021-01-19T00:00:00Z","modified":"2026-10-14T09:45:04Z","title":"Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.24002,"percentile":0.9789,"provenance":"source"},"cwes":[{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"references":[{"url":"https://bugs.python.org/issue42938","tags":[]},{"url":"https://github.com/python/cpython/pull/24239","tags":[]},{"url":"https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MGSV6BJQLRQ6RKVUXK7JGU7TP4QFGQXC/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NQPARTLNSFQVMMQHPNBFOCOZOO3TMQNA/","tags":["vendor-advisory"]},{"url":"https://security.gentoo.org/glsa/202101-18","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z7GZV74KM72O2PEJN2C4XP3V5Q5MZUOO/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CCFZMVRQUKCBQIG5F2CBVADK63NFSE4A/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRHOCQYX3QLDGDQGTWQAUUT2GGIZCZUO/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXSMBHES3ANXXS2RSO5G6Q24BR4B2PWK/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6XJAULOS5JVB2L67NCKKMJ5NTKZJBSD/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YDTZVGSXQ7HR7OCGSUHTRNTMBG43OMKU/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y4KSYYWMGAKOA2JVCQA422OINT6CKQ7O/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FPE7SMXYUIWPOIZV4DQYXODRXMFX3C5E/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HCQTCSP6SCVIYNIRUJC5X7YBVUHPLSC4/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NODWHDIFBQE5RU5PUWUVE47JOT5VCMJ2/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MP572OLHMS7MZO4KUPSCIMSZIA5IZZ62/","tags":["vendor-advisory"]},{"url":"https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E","tags":["mailing-list"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FONHJIOZOFD7CD35KZL6SVBUTMBPGZGA/","tags":["vendor-advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html","tags":["mailing-list"]},{"url":"https://www.oracle.com//security-alerts/cpujul2021.html","tags":[]},{"url":"https://news.ycombinator.com/item?id=26185005","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20210226-0003/","tags":[]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":[]},{"url":"https://www.oracle.com/security-alerts/cpujan2022.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html","tags":["mailing-list"]},{"url":"https://www.oracle.com/security-alerts/cpujul2022.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html","tags":["mailing-list"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[]}],"priority":{"score":26.4,"factors":[{"name":"EPSS percentile","points":19.58},{"name":"CVSS severity","points":6.86}]},"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2025-12-18T15:03:29.016940Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"Python 3.x through 3.9.1 contains a buffer overflow in the PyCArg_repr function in _ctypes/callproc.c, where sprintf is used unsafely. An attacker who can supply floating-point numbers as input to a Python application that handles untrusted values can trigger the overflow, as demonstrated by passing 1e300 to c_double.from_param, potentially leading to remote code execution in affected applications.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:38:33Z"},"euvd":{"id":"EUVD-2021-26520","exploited":false,"provenance":"source"}}