CVE-2021-3177
published critical CVSS 3.1 · 9.8python: Stack-based buffer overflow in PyCArg_repr in _ctypes/callproc.c
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| Siemens | — | SIMATIC S7-1500 CPU 1518-4 PN/DP MFPV3.1.0 to < V3.1.5 · Other versions: unknown | Affected | Not stated | siemens-SADP |
| Siemens | — | SIMATIC S7-1500 CPU 1518-4 PN/DP MFPV3.1.0 to < V3.1.5 · Other versions: unknown | Affected | Not stated | siemens-SADP |
| Siemens | — | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFPV3.1.0 to < V3.1.5 · Other versions: unknown | Affected | Not stated | siemens-SADP |
| Amazon Linux | AL2 | Release evaluationALAS2-2021-1611 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2PYTHON3.8-2023-005 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 8 | python-psycopg2-doc | Advisory build | 2.7.5-7.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| Alpine Linux | edge | python3 | Fixed | 3.8.7-r2 | Package fix record |
Show 101 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Siemens | — | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFPV3.1.0 to < V3.1.5 · Other versions: unknown | Affected | Not stated | siemens-SADP |
| Siemens | — | SIPLUS S7-1500 CPU 1518-4 PN/DP MFPV3.1.0 to < V3.1.5 · Other versions: unknown | Affected | Not stated | siemens-SADP |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Debian | buster | python2.7 | Advisory build | 2.7.16-2+deb10u2 | DLA-3432-1 |
| Oracle Linux | 7 | pythonaarch64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| AlmaLinux | 8 | python-sqlalchemy-doc | Advisory build | 1.3.2-2.module_el8.5.0+2569+5c5719bc | ALSA-2021:1761 |
| AlmaLinux | 8 | python-sqlalchemy-doc | Advisory build | 1.3.2-2.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-Cython | Advisory build | 0.28.1-7.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-PyMySQL | Advisory build | 0.8.0-10.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-attrs | Advisory build | 17.4.0-10.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-backports | Advisory build | 1.0-16.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-backports-ssl_match_hostname | Advisory build | 3.5.0.1-12.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-chardet | Advisory build | 3.0.4-10.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-coverage | Advisory build | 4.5.1-4.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-dns | Advisory build | 1.15.0-10.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-docs | Advisory build | 2.7.16-2.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-docs-info | Advisory build | 2.7.16-2.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-docutils | Advisory build | 0.14-12.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-funcsigs | Advisory build | 1.0.2-13.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-idna | Advisory build | 2.5-7.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-ipaddress | Advisory build | 1.0.18-6.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-markupsafe | Advisory build | 0.23-19.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-mock | Advisory build | 2.0.0-13.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-numpy | Advisory build | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-numpy-doc | Advisory build | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-numpy-f2py | Advisory build | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-pluggy | Advisory build | 0.6.0-8.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-psycopg2 | Advisory build | 2.7.5-7.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-psycopg2-debug | Advisory build | 2.7.5-7.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-psycopg2-tests | Advisory build | 2.7.5-7.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-py | Advisory build | 1.5.3-6.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-pysocks | Advisory build | 1.6.8-6.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-pytest | Advisory build | 3.4.2-13.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-pytest-mock | Advisory build | 1.9.0-4.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-pytz | Advisory build | 2017.2-12.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-pyyaml | Advisory build | 3.12-16.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-requests | Advisory build | 2.20.0-3.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-rpm-macros | Advisory build | 3-38.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-setuptools | Advisory build | 39.0.1-13.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-setuptools-wheel | Advisory build | 39.0.1-13.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-setuptools_scm | Advisory build | 1.15.7-6.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-six | Advisory build | 1.11.0-6.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-sqlalchemy | Advisory build | 1.3.2-2.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python2-urllib3 | Advisory build | 1.24.2-3.module_el8.6.0+2781+fed64c13 | ALSA-2021:1761 |
| AlmaLinux | 8 | python38-Cython | Advisory build | 0.29.14-4.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-PyMySQL | Advisory build | 0.10.1-1.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-asn1crypto | Advisory build | 1.2.0-3.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-cffi | Advisory build | 1.13.2-3.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-chardet | Advisory build | 3.0.4-19.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-cryptography | Advisory build | 2.8-3.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-idna | Advisory build | 2.8-6.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-markupsafe | Advisory build | 1.1.1-6.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-mod_wsgi | Advisory build | 4.6.8-3.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-ply | Advisory build | 3.11-10.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-psycopg2 | Advisory build | 2.8.4-4.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-psycopg2-doc | Advisory build | 2.8.4-4.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-psycopg2-tests | Advisory build | 2.8.4-4.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-pycparser | Advisory build | 2.19-3.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-pysocks | Advisory build | 1.7.1-4.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-pytz | Advisory build | 2019.3-3.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-requests | Advisory build | 2.22.0-9.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-scipy | Advisory build | 1.3.1-4.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| AlmaLinux | 8 | python38-six | Advisory build | 1.12.0-10.module_el8.6.0+2778+cd494b30 | ALSA-2021:1879 |
| Alpine Linux | v3.10 | python3 | Fixed | 3.7.7-r2 | Package fix record |
| Alpine Linux | v3.11 | python3 | Fixed | 3.8.2-r2 | Package fix record |
| Alpine Linux | v3.12 | python3 | Fixed | 3.8.5-r1 | Package fix record |
| Alpine Linux | v3.13 | python3 | Fixed | 3.8.7-r1 | Package fix record |
| Alpine Linux | v3.14 | python2 | Fixed | 2.7.18-r1 | Package fix record |
| Alpine Linux | v3.14 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.15 | python2 | Fixed | 2.7.18-r1 | Package fix record |
| Alpine Linux | v3.15 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.16 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.17 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.18 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.19 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.20 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.21 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.22 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.23 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Alpine Linux | v3.24 | python3 | Fixed | 3.8.7-r2 | Package fix record |
| Debian | stretch | python2.7 | Advisory build | 2.7.13-2+deb9u6 | DLA-2919-1 |
| Debian | stretch | python3.5 | Advisory build | 3.5.3-1+deb9u4 | DLA-2619-1 |
| Oracle Linux | 7 | pythonaarch64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | pythonx86_64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | pythonx86_64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-debugaarch64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-debugaarch64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-debugx86_64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-debugx86_64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-develaarch64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-develaarch64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-develx86_64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-develx86_64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-libsaarch64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-libsaarch64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-libsx86_64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-libsx86_64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-testaarch64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-testaarch64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
| Oracle Linux | 7 | python-testx86_64 | Advisory build | 0:2.7.5-90.0.3.el7 | ELSA-2021-9107 |
| Oracle Linux | 7 | python-testx86_64 | Advisory build | 0:2.7.5-92.0.1.el7_9 | ELSA-2022-5235 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | V3.1.0 to < V3.1.5 (affected · custom)Default: unknown | siemens-SADP · adp |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | V3.1.0 to < V3.1.5 (affected · custom)Default: unknown | siemens-SADP · adp |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | V3.1.0 to < V3.1.5 (affected · custom)Default: unknown | siemens-SADP · adp |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | V3.1.0 to < V3.1.5 (affected · custom)Default: unknown | siemens-SADP · adp |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | V3.1.0 to < V3.1.5 (affected · custom)Default: unknown | siemens-SADP · adp |
Weaknesses
2- n/a
- CWE-120 CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
References
29- https://bugs.python.org/issue42938
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html
- https://github.com/python/cpython/pull/24239
- [mina-dev] 20210225 [jira] [Created] (FTPSERVER-500) Security vulnerability in common/lib/log4j-1.2.17.jar https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E
- [debian-lts-announce] 20210405 [SECURITY] [DLA 2619-1] python3.5 security update https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html
- [debian-lts-announce] 20220212 [SECURITY] [DLA 2919-1] python2.7 security update https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html
- [debian-lts-announce] 20230524 [SECURITY] [DLA 3432-1] python2.7 security update https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html
- FEDORA-2021-42ba9feb47 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRHOCQYX3QLDGDQGTWQAUUT2GGIZCZUO/
- FEDORA-2021-ced31f3f0c https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CCFZMVRQUKCBQIG5F2CBVADK63NFSE4A/
- FEDORA-2021-907f3bacae https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FONHJIOZOFD7CD35KZL6SVBUTMBPGZGA/
- FEDORA-2021-d5cde50865 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FPE7SMXYUIWPOIZV4DQYXODRXMFX3C5E/
- FEDORA-2021-7547ad987f https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HCQTCSP6SCVIYNIRUJC5X7YBVUHPLSC4/
- FEDORA-2021-faf88b9499 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MGSV6BJQLRQ6RKVUXK7JGU7TP4QFGQXC/
- FEDORA-2021-3352c1c802 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MP572OLHMS7MZO4KUPSCIMSZIA5IZZ62/
- FEDORA-2021-f4fd9372c7 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NODWHDIFBQE5RU5PUWUVE47JOT5VCMJ2/
- FEDORA-2021-cc3ff94cfc https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NQPARTLNSFQVMMQHPNBFOCOZOO3TMQNA/
- FEDORA-2021-076a2dccba https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXSMBHES3ANXXS2RSO5G6Q24BR4B2PWK/
- FEDORA-2021-851c6e4e2d https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6XJAULOS5JVB2L67NCKKMJ5NTKZJBSD/
- FEDORA-2021-17668e344a https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y4KSYYWMGAKOA2JVCQA422OINT6CKQ7O/
- FEDORA-2021-66547ff92d https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YDTZVGSXQ7HR7OCGSUHTRNTMBG43OMKU/
- FEDORA-2021-e3a5a74610 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z7GZV74KM72O2PEJN2C4XP3V5Q5MZUOO/
- https://news.ycombinator.com/item?id=26185005
- https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html
- GLSA-202101-18 https://security.gentoo.org/glsa/202101-18
- https://security.netapp.com/advisory/ntap-20210226-0003/
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
Provider assertions
4mitre · cna
siemens-SADP · adp
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- caa0f40a7266bba0bd7ff755ffbd34d15f7ded268cf2c12cfa9445de960b3740
- Ingested
- 14 Oct 2026, 09:52:31 UTC
- Source record
- Official CVE record