CVE-2026-8328

FTP PASV SSRF, ftpcp() does not use actual peer address, trusts server-supplied PASV host address

State
Published
Severity
5.9 Medium
Published
May 13, 2026
Updated
Aug 13, 2026
Reserved
May 11, 2026

Read the record on cve.org

Description

The ftpcp() function in Lib/ftplib.py was not updated when CVE-2021-4189 was fixed. While makepasv() was patched to replace server-supplied PASV host addresses with the actual peer address (getpeername()[0]), ftpcp() still calls parse227() directly and passes the raw attacker-controllable IP address and port to target.sendport(). This patch is related to CVE-2021-4189.

Scores

CVSSScoreVectorSource
4.05.9 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:NPSF

Weaknesses

  • CWE-918 Server-Side request forgery (SSRF)

Affected Products

ProductVersions
CPythonPython Software Foundation
  • before 3.10.21Affected
  • 3.11.0 to before 3.11.16Affected
  • 3.12.0 to before 3.12.14Affected
  • 3.13.0 to before 3.13.14Affected
  • 3.14.0 to before 3.14.6Affected
  • 3.15.0a1 to before 3.15.0b2Affected

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.