Skip to main content
← All vulnerabilities
CVE-2024-3219

Pure-Python fallback of socket.socketpair() doesn’t authenticate peer connection

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.5, and 1 more
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • Python Software Foundation CPython

    fixed in 3.8.20; From 3.9.0 · fixed in 3.9.20; From 3.10.0 · fixed in 3.10.15; From 3.11.0 · fixed in 3.11.10; From 3.12.0 · fixed in 3.12.5; From 3.13.0a1 · fixed in 3.13.0rc1

References 18

GitHub · python/cpython

mail.python.org

openwall.com