Pure-Python fallback of socket.socketpair() doesn’t authenticate peer connection
The “socket” module provides a pure-Python fallback to the socket.socketpair() function for platforms that don’t support AF_UNIX, such as Windows. This pure-Python implementation uses AF_INET or AF_INET6 to create a local connected pair of sockets. The connection between the two sockets was not verified before passing the two sockets back to the user, which leaves the server socket vulnerable to a connection race from a malicious local peer. Platforms that support AF_UNIX such as Linux and macOS are not affected by this vulnerability. Versions prior to CPython 3.5 are not affected due to the vulnerable API not being included.
- Published
- Jul 29, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.2% · 15th percentile
- CWE
- CWE-306
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
20
Monitor
Low priority for now.
- CVSS
- 20 / 40 · 5.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · PSF
- 5.1
- NVD has not scored this yet; the score shown is the CNA’s.
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
—
Versions reported by the vendor
Affected version ranges reported by the assigning authority (PSF). Independent of NVD's CPE analysis and usually ahead of it.
Python Software Foundation CPython
- before 3.8.20affected · python
- 3.9.0 and later · before 3.9.20affected · python
- 3.10.0 and later · before 3.10.15affected · python
- 3.11.0 and later · before 3.11.10affected · python
- 3.12.0 and later · before 3.12.5affected · python
- 3.13.0a1 and later · before 3.13.0rc1affected · python
Same product
python software foundation: all recordsOther highest-scoring records for the same primary product.
- CVE-2025-4517Arbitrary writes via tarfile realpath overflow37Monitor
- CVE-2026-19445Use-after-free of a server-side SSLContext when sni_callback switches contexts36Monitor
- CVE-2026-6100Use-after-free in lzma.LZMADecompressor, bz2.BZ2Decompressor, and gzip.GzipFile after re-use under memory pressure36Monitor
- CVE-2026-3298Out-of-bounds write in Windows asyncio.ProacterEventLoop.sock_recvfrom_into() when using nbytes35Monitor
- CVE-2024-12254Unbounded memory buffering in SelectorSocketTransport.writelines()35Monitor
- CVE-2024-8088Infinite loop when iterating over zip archive entry names from zipfile.Path34Monitor
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 |
|---|---|---|
| Python Software Foundation CPython | 3.10.15 | Vendor (CNA) |
| Python Software Foundation CPython | 3.11.10 | Vendor (CNA) |
| Python Software Foundation CPython | 3.12.5 | Vendor (CNA) |
| Python Software Foundation CPython | 3.13.0rc1 | Vendor (CNA) |
| Python Software Foundation CPython | 3.8.20 | Vendor (CNA) |
| Python Software Foundation CPython | 3.9.20 | Vendor (CNA) |
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.
- python/cpythoncommit 06fa244
- python/cpythoncommit 0b65c8b
- python/cpythoncommit 220e31a
- python/cpythoncommit 2621a8a
- python/cpythoncommit 31302f5
- python/cpythoncommit 3f5d9d1
- python/cpythoncommit 5df322e
- python/cpythoncommit 5f90aba
- python/cpythoncommit 78df104
- python/cpythoncommit b252317
- python/cpythoncommit c21a361
- python/cpythoncommit c5655aa
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Elliereporter
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
—
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
- CVE-2024-69233 days apartEmail header injection due to unquoted newlines22Monitor
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system 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
- Integrity
- Availability
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-306 · Missing Authentication for Critical FunctionCVSS vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
nvd-secondary
Root cause
A function added for development or support ships to production without authentication. It often relies on the assumption that it is “only reachable from the internal network.”
The bug in code
The whole CWE-306 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
// Added for the support teamapp.post("/maintenance/reset", resetDevice);Fixed
if (config.maintenanceEnabled) { app.post( "/maintenance/reset", requireSession, requireRole("admin"), resetDevice );}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)
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- www.openwall.com/lists/oss-security/2024/07/29/3
- github.com/python/cpython/commit/06fa244666ec6335a3b9bf2367e31b42b9a89b20
- github.com/python/cpython/commit/0b65c8bf5367625673eafb92f85046a1b31259f2
- github.com/python/cpython/commit/220e31adeaaa8436c9ff234cba1398bc49e2bb6c
- github.com/python/cpython/commit/2621a8a40ba4b2c68ca564671b7daa5da80a4508
- github.com/python/cpython/commit/31302f5fc24eecd693f0c8aaba7c2840b09b594d
- github.com/python/cpython/commit/3f5d9d12c74787fbf3f5891835c85cc15526c86d
- github.com/python/cpython/commit/5df322e91a40909e6904bbdbc0c3a6b6a9eead39
- github.com/python/cpython/commit/5f90abaa786f994db3907fc31e2ee00ea2cf0929
- github.com/python/cpython/commit/78df1043dbdce5c989600616f9f87b4ee72944e5
- github.com/python/cpython/commit/b252317956b7fc035bb3774ef6a177e227f9fc54
- github.com/python/cpython/commit/c21a36112a0028d7ac3cf8f480e0dc88dba5922c
- github.com/python/cpython/commit/c5655aa6ad120d2ed7f255bebd6e8b71a9c07dde
- github.com/python/cpython/commit/e319f774f9e766a2b92949444a2d46081df3363a
- github.com/python/cpython/commit/f071f01b7b7e19d7d6b3a4b0ec62f820ecb14660
- github.com/python/cpython/issues/122133
- github.com/python/cpython/pull/122134
- mail.python.org/archives/list/security-announce@python.org/thread/WYKDQWIERRE2ICIYMSVRZJO33GSCWU2B/
- security.netapp.com/advisory/ntap-20250502-0004/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.