CVE-2024-3219

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

State
Published
Severity
5.1 Medium
Published
Jul 29, 2024
Updated
May 2, 2025
Reserved
Apr 2, 2024

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
4.05.1 MediumCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NPSF

Weaknesses

  • CWE-306 Missing Authentication for Critical Function

Affected Products

ProductVersions
CPythonPython Software Foundation
  • before 3.8.20Affected
  • 3.9.0 to before 3.9.20Affected
  • 3.10.0 to before 3.10.15Affected
  • 3.11.0 to before 3.11.10Affected
  • 3.12.0 to before 3.12.5Affected
  • 3.13.0a1 to before 3.13.0rc1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.