CVE-2021-3177: 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 Pyth
Noroxi assessment
Priority: Plan (action score 46/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 24% (FIRST EPSS); higher than 97.8% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- According to CISA the attack is automatable: targets can be found by mass scanning.
- Fixed version: python-psycopg2-doc (AlmaLinux:8) 2.7.5-7.module_el8.6.0+2781+fed64c13; python-sqlalchemy-doc (AlmaLinux:8) 1.3.2-2.module_el8.6.0+2781+fed64c13, 1.3.2-2.module_el8.5.0+2569+5c5719bc; python2-attrs (AlmaLinux:8) 17.4.0-10.module_el8.6.0+2781+fed64c13.
- Mentioned 3 times in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Add it to your regular patch cycle. Upgrade to python-psycopg2-doc (AlmaLinux:8) 2.7.5-7.module_el8.6.0+2781+fed64c13; python-sqlalchemy-doc (AlmaLinux:8) 1.3.2-2.module_el8.6.0+2781+fed64c13, 1.3.2-2.module_el8.5.0+2569+5c5719bc; python2-attrs (AlmaLinux:8) 17.4.0-10.module_el8.6.0+2781+fed64c13 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- BDU:2021-01781
- ALSA-2021:1761
- ALSA-2021:1879
- DLA-2619-1
- DLA-2919-1
- DLA-3432-1
- openSUSE-SU-2021:0270-1
- openSUSE-SU-2021:0331-1
- openSUSE-SU-2024:11283-1
- openSUSE-SU-2024:11285-1
- openSUSE-SU-2024:11286-1
- openSUSE-SU-2024:12089-1
- openSUSE-SU-2024:12910-1
- openSUSE-SU-2024:14109-1
- openSUSE-SU-2024:14434-1
- openSUSE-SU-2025:15713-1
- RHSA-2021:1633
- RHSA-2021:1761
- RHSA-2021:1879
- RHSA-2021:3252
- Published
- Jan 19, 2021
- Updated
- Oct 14, 2026
- EPSS
- 24.0% · 97th percentile
- CWE
- CWE-120
Report tools
Action score
46
Plan
Add it to your regular patch cycle.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 7 / 30 · 24.0%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- yes
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 9.8
- CNA · mitre
- 9.8
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| python | python | cpe:2.3:a:python:python |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| netapp | active iq unified manager | cpe:2.3:a:netapp:active_iq_unified_manager |
| netapp | ontap select deploy administration utility | cpe:2.3:a:netapp:ontap_select_deploy_administration_utility |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| oracle | communications cloud native core network function cloud native environment | cpe:2.3:a:oracle:communications_cloud_native_core_network_function_cloud_native_environment |
| oracle | communications offline mediation controller | cpe:2.3:a:oracle:communications_offline_mediation_controller |
| oracle | communications pricing design center | cpe:2.3:a:oracle:communications_pricing_design_center |
| oracle | enterprise manager ops center | cpe:2.3:a:oracle:enterprise_manager_ops_center |
| oracle | zfs storage appliance kit | cpe:2.3:a:oracle:zfs_storage_appliance_kit |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux9.0
- fedoraproject fedora32
- fedoraproject fedora33
- netapp active iq unified managerall versions
- netapp ontap select deploy administration utilityall versions
- oracle communications cloud native core network function cloud native environment22.2.0
- oracle communications offline mediation controller12.0.0.3.0
- oracle communications pricing design center12.0.0.3.0
- oracle enterprise manager ops center12.4.0.0
- oracle zfs storage appliance kit8.8
- python python3.9.0 and later · up to 3.9.1 inclusive
- python python3.8.0 and later · up to 3.8.7 inclusive
- python python3.7.0 and later · up to 3.7.9 inclusive
- python python3.6.0 and later · up to 3.6.12 inclusive
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | python-psycopg2-doc | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python-sqlalchemy-doc | before 1.3.2-2.module_el8.6.0+2781+fed64c13 | 1.3.2-2.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python-sqlalchemy-doc | before 1.3.2-2.module_el8.5.0+2569+5c5719bc | 1.3.2-2.module_el8.5.0+2569+5c5719bc |
| AlmaLinux:8 | python2-attrs | before 17.4.0-10.module_el8.6.0+2781+fed64c13 | 17.4.0-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-backports | before 1.0-16.module_el8.6.0+2781+fed64c13 | 1.0-16.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-backports-ssl_match_hostname | before 3.5.0.1-12.module_el8.6.0+2781+fed64c13 | 3.5.0.1-12.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-chardet | before 3.0.4-10.module_el8.6.0+2781+fed64c13 | 3.0.4-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-coverage | before 4.5.1-4.module_el8.6.0+2781+fed64c13 | 4.5.1-4.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-Cython | before 0.28.1-7.module_el8.6.0+2781+fed64c13 | 0.28.1-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-dns | before 1.15.0-10.module_el8.6.0+2781+fed64c13 | 1.15.0-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-docs | before 2.7.16-2.module_el8.6.0+2781+fed64c13 | 2.7.16-2.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-docs-info | before 2.7.16-2.module_el8.6.0+2781+fed64c13 | 2.7.16-2.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-docutils | before 0.14-12.module_el8.6.0+2781+fed64c13 | 0.14-12.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-funcsigs | before 1.0.2-13.module_el8.6.0+2781+fed64c13 | 1.0.2-13.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-idna | before 2.5-7.module_el8.6.0+2781+fed64c13 | 2.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-ipaddress | before 1.0.18-6.module_el8.6.0+2781+fed64c13 | 1.0.18-6.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-markupsafe | before 0.23-19.module_el8.6.0+2781+fed64c13 | 0.23-19.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-mock | before 2.0.0-13.module_el8.6.0+2781+fed64c13 | 2.0.0-13.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-numpy | before 1:1.14.2-16.module_el8.6.0+2781+fed64c13 | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-numpy-doc | before 1:1.14.2-16.module_el8.6.0+2781+fed64c13 | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-numpy-f2py | before 1:1.14.2-16.module_el8.6.0+2781+fed64c13 | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pluggy | before 0.6.0-8.module_el8.6.0+2781+fed64c13 | 0.6.0-8.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-psycopg2 | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-psycopg2-debug | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
+96
Same product
python: all recordsOther highest-scoring records for the same primary product.
- CVE-2016-5636Integer overflow in the get_data function in zipimport.c in CPython (aka Python) before 2.7.12, 3.x before 3.4.5, and 3.5.x before 3.5.2 all47Plan
- CVE-2007-4559Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remot47Plan
- CVE-2014-4650The CGIHTTPServer module in Python 2.7.5 and 3.3.4 does not properly handle URLs in which URL encoding is used for path separators, which al46Plan
Published before and after this one in the same product
- ← EarlierCVE-2020-26116Sep 27, 2020 · http.client in Python 3.x before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5 allows CRLF injection if the attack30Monitor
- ← EarlierCVE-2020-27619Oct 22, 2020 · In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.42Plan
- Later →CVE-2021-23336Feb 15, 2021 · The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9.0 and before 3.9.2 35Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:python-psycopg2-doc | 2.7.5-7.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python-sqlalchemy-doc | 1.3.2-2.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-attrs | 17.4.0-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-backports | 1.0-16.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-backports-ssl_match_hostname | 3.5.0.1-12.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-chardet | 3.0.4-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-coverage | 4.5.1-4.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-Cython | 0.28.1-7.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-dns | 1.15.0-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-docs | 2.7.16-2.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-docs-info | 2.7.16-2.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-PyMySQL | 0.8.0-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| alpine:python2 | 2.7.18-r1 · Alpine:v3.14 | Package registry (OSV) |
| alpine:python3 | 3.7.7-r2 · Alpine:v3.10 | Package registry (OSV) |
| debian:python2.7 | 2.7.18-2 · Debian:11 | Package registry (OSV) |
| debian:python3.5 | 3.5.3-1+deb9u4 · Debian:9 | Package registry (OSV) |
| debian:python3.9 | 3.9.1-3 · Debian:11 | Package registry (OSV) |
| opensuse:python | 2.7.17-lp152.3.12.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:python-base | 2.7.17-lp152.3.12.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:python-doc | 2.7.17-lp152.3.12.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:python3 | 3.6.12-lp152.4.17.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:python3-core | 3.6.12-lp152.4.17.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:python3-documentation | 3.6.12-lp152.4.17.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:python310 | 3.10.0rc1-4.2 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python311 | 3.11.0b1-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python312 | 3.12.0a7-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python313 | 3.13.0~b3-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python38 | 3.8.12-1.2 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python39 | 3.9.7-2.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:Cython | 0:0.28.1-7.module+el8.1.0+3111+de3f2d8e · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
+30
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-22-0465 · Jun 29, 2022(RedHat Güvenlik Güncellemesi)
- TR-21-0772 · Sep 23, 2021(RedHat Güvenlik Zafiyeti)
- TR-21-0557 · Jul 7, 2021(IBM Güvenlik Bülteni Yayınladı)
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-120 · Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
When data is copied, the source length is not compared with the size of the destination buffer. Excess data overwrites adjacent memory.
The bug in code
The whole CWE-120 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
char buf[256];
memcpy(buf, pkt->data, pkt->len);Fixed
char buf[256];
if (pkt->len > sizeof(buf)) {
return -EINVAL;
}
memcpy(buf, pkt->data, pkt->len);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10likelihood: High · High
- Overflow BuffersCAPEC-100likelihood: High · Very High
- Client-side Injection-induced Buffer OverflowCAPEC-14likelihood: Medium · High
- Filter Failure through Buffer OverflowCAPEC-24likelihood: High · High
- MIME ConversionCAPEC-42likelihood: High · High
- Overflow Binary Resource FileCAPEC-44likelihood: High · Very High
- Buffer Overflow via Symbolic LinksCAPEC-45likelihood: High · High
- Overflow Variables and TagsCAPEC-46likelihood: High · High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (19 more)Show less
- lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E
- lists.debian.org/debian-lts-announce/2021/04/msg00005.html
- lists.debian.org/debian-lts-announce/2022/02/msg00013.html
- lists.debian.org/debian-lts-announce/2023/05/msg00024.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRHOCQYX3QLDGDQGTWQAUUT2GGIZCZUO/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CCFZMVRQUKCBQIG5F2CBVADK63NFSE4A/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FONHJIOZOFD7CD35KZL6SVBUTMBPGZGA/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FPE7SMXYUIWPOIZV4DQYXODRXMFX3C5E/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HCQTCSP6SCVIYNIRUJC5X7YBVUHPLSC4/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MGSV6BJQLRQ6RKVUXK7JGU7TP4QFGQXC/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MP572OLHMS7MZO4KUPSCIMSZIA5IZZ62/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NODWHDIFBQE5RU5PUWUVE47JOT5VCMJ2/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NQPARTLNSFQVMMQHPNBFOCOZOO3TMQNA/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NXSMBHES3ANXXS2RSO5G6Q24BR4B2PWK/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6XJAULOS5JVB2L67NCKKMJ5NTKZJBSD/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y4KSYYWMGAKOA2JVCQA422OINT6CKQ7O/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YDTZVGSXQ7HR7OCGSUHTRNTMBG43OMKU/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z7GZV74KM72O2PEJN2C4XP3V5Q5MZUOO/
- news.ycombinator.com/item?id=26185005
Vendor advisories and official records. Exploit/PoC links are deliberately left out.