CVE-2023-40217: An issue was discovered in Python before 3.8.18, 3.9.x before 3.9.18, 3.10.x before 3.10.13, and 3.11.x before 3.11.5.
Noroxi assessment
Priority: Monitor (action score 21/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: 0.79% (FIRST EPSS); higher than 56.4% 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: babel (AlmaLinux:8) 2.5.1-10.module_el8.6.0+2781+fed64c13; platform-python (AlmaLinux:8) 3.6.8-51.el8_8.2.alma.1; platform-python-debug (AlmaLinux:8) 3.6.8-51.el8_8.2.alma.1.
Low priority for now. Upgrade to babel (AlmaLinux:8) 2.5.1-10.module_el8.6.0+2781+fed64c13; platform-python (AlmaLinux:8) 3.6.8-51.el8_8.2.alma.1; platform-python-debug (AlmaLinux:8) 3.6.8-51.el8_8.2.alma.1 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
An issue was discovered in Python before 3.8.18, 3.9.x before 3.9.18, 3.10.x before 3.10.13, and 3.11.x before 3.11.5. It primarily affects servers (such as HTTP servers) that use TLS client authentication. If a TLS server-side socket is created, receives data into the socket buffer, and then is closed quickly, there is a brief window where the SSLSocket instance will detect the socket as "not connected" and won't initiate a handshake, but buffered data will still be readable from the socket buffer. This data will not be authenticated if the server-side TLS peer is expecting client certificate authentication, and is indistinguishable from valid TLS stream data. Data is limited in size to the amount that will fit in the buffer. (The TLS connection cannot directly be used for data exfiltration because the vulnerable code path requires that the connection be closed on initialization of the SSLSocket.)
- BDU:2023-05002
- ALSA-2023:5456
- ALSA-2023:5462
- ALSA-2023:5463
- ALSA-2023:5994
- ALSA-2023:5997
- ALSA-2023:5998
- DLA-3575-1
- DLA-3614-1
- DLA-3948-1
- DLA-3980-1
- openSUSE-SU-2024:13193-1
- openSUSE-SU-2024:13201-1
- openSUSE-SU-2024:13215-1
- openSUSE-SU-2024:13219-1
- openSUSE-SU-2024:13236-1
- openSUSE-SU-2024:13248-1
- RHSA-2023:5456
- RHSA-2023:5462
- RHSA-2023:5463
- Published
- Aug 24, 2023
- Updated
- Jun 17, 2026
- EPSS
- 0.7% · 56th percentile
- CWE
- —
Report tools
Action score
21
Monitor
Low priority for now.
- CVSS
- 21 / 40 · 5.3 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.7%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
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 |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- python pythonbefore 3.8.18
- python python3.9.0 and later · before 3.9.18
- python python3.10.0 and later · before 3.10.13
- python python3.11.0 and later · before 3.11.5
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | babel | before 2.5.1-10.module_el8.6.0+2781+fed64c13 | 2.5.1-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | platform-python | before 3.6.8-51.el8_8.2.alma.1 | 3.6.8-51.el8_8.2.alma.1 |
| AlmaLinux:8 | platform-python-debug | before 3.6.8-51.el8_8.2.alma.1 | 3.6.8-51.el8_8.2.alma.1 |
| AlmaLinux:8 | platform-python-devel | before 3.6.8-51.el8_8.2.alma.1 | 3.6.8-51.el8_8.2.alma.1 |
| AlmaLinux:8 | python-nose-docs | before 1.3.7-31.module_el8.6.0+2781+fed64c13 | 1.3.7-31.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python-psycopg2-doc | before 2.7.5-7.module_el8.6.0+3162+01a09e5a | 2.7.5-7.module_el8.6.0+3162+01a09e5a |
| 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 | python2 | before 2.7.18-13.module_el8.8.0+3663+627ce7bb.2.alma.1 | 2.7.18-13.module_el8.8.0+3663+627ce7bb.2.alma.1 |
| 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-babel | before 2.5.1-10.module_el8.6.0+2781+fed64c13 | 2.5.1-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 | before 1.0-16.module_el8.6.0+3162+01a09e5a | 1.0-16.module_el8.6.0+3162+01a09e5a |
| 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-bson | before 3.7.0-1.module_el8.6.0+2781+fed64c13 | 3.7.0-1.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-bson | before 3.7.0-1.module_el8.6.0+3162+01a09e5a | 3.7.0-1.module_el8.6.0+3162+01a09e5a |
| 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+3162+01a09e5a | 4.5.1-4.module_el8.6.0+3162+01a09e5a |
| 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-Cython | before 0.28.1-7.module_el8.6.0+3162+01a09e5a | 0.28.1-7.module_el8.6.0+3162+01a09e5a |
| AlmaLinux:8 | python2-debug | before 2.7.18-13.module_el8.8.0+3663+627ce7bb.2.alma.1 | 2.7.18-13.module_el8.8.0+3663+627ce7bb.2.alma.1 |
| AlmaLinux:8 | python2-devel | before 2.7.18-13.module_el8.8.0+3663+627ce7bb.2.alma.1 | 2.7.18-13.module_el8.8.0+3663+627ce7bb.2.alma.1 |
| 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 |
+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-2021-3177Python 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 Pyth46Plan
Published before and after this one in the same product
- ← EarlierCVE-2022-48560Aug 22, 2023 · A use-after-free exists in Python through 3.9 via heappushpop in heapq.31Monitor
- ← EarlierCVE-2023-41105Aug 23, 2023 · An issue was discovered in Python 3.11 through 3.11.4.31Monitor
- Later →CVE-2023-6507Dec 8, 2023 · Groups not dropped before running subprocess when using empty 'extra_groups' parameter19Monitor
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-unversioned-command | 3.9.16-1.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3 | 3.9.16-1.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3-debug | 3.9.16-1.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3-devel | 3.9.16-1.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3-idle | 3.9.16-1.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11 | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11-debug | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11-devel | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11-idle | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11-libs | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11-test | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.11-tkinter | 3.11.2-2.el9_2.2 · AlmaLinux:9 | Package registry (OSV) |
| alpine:python3 | 3.9.18-r0 · Alpine:v3.15 | Package registry (OSV) |
| debian:pypy3 | 7.3.11+dfsg-2+deb12u2 · Debian:12 | Package registry (OSV) |
| debian:python2.7 | 2.7.16-2+deb10u3 · Debian:10 | Package registry (OSV) |
| debian:python3.11 | 3.11.2-6+deb12u2 · Debian:12 | Package registry (OSV) |
| debian:python3.7 | 3.7.3-2+deb10u6 · Debian:10 | Package registry (OSV) |
| debian:python3.9 | 3.9.2-1+deb11u2 · Debian:11 | Package registry (OSV) |
| opensuse:python | 2.7.18-150000.54.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python-base | 2.7.18-150000.54.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python-doc | 2.7.18-150000.54.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python3 | 3.6.15-150300.10.51.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python3-core | 3.6.15-150300.10.51.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python3-documentation | 3.6.15-150300.10.51.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python310 | 3.10.13-150400.4.33.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python310-core | 3.10.13-150400.4.33.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python310-documentation | 3.10.13-150400.4.33.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python39 | 3.9.18-150300.4.33.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python39-core | 3.9.18-150300.4.33.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:python39-documentation | 3.9.18-150300.4.33.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
+38
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.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
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).
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
- low · data can be read
- Integrity
- none
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- Low
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
—
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (6 more)Show less
- lists.debian.org/debian-lts-announce/2023/10/msg00017.html
- mail.python.org/archives/list/security-announce%40python.org/thread/PEPLII27KYHLF4AK3ZQGKYNCRERG4YXY/
- security.netapp.com/advisory/ntap-20231006-0014/
- www.python.org/dev/security/
- lists.debian.org/debian-lts-announce/2024/11/msg00005.html
- lists.debian.org/debian-lts-announce/2024/12/msg00000.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.