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

Published May 13, 2026
·
Updated

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

Other sources

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.

— Launchpad

Affected Software

14 affected componentsFixes available
Python CPython
Microsoft azl3 python3 3.12.9-11
Microsoft azl3 python3 3.12.9-13<3.12.9-13
3.12.9-13
Microsoft azl3 python3 3.12.9-11<3.12.9-12
3.12.9-12
debian/pypy3*
debian/pypy3*
debian/pypy3<8.0.0+dfsg-1
8.0.0+dfsg-1
debian/python3.11<3.11.2-6+deb12u9
3.11.2-6+deb12u9
debian/python3.13<3.13.5-2+deb13u3
3.13.5-2+deb13u3
debian/python3.14<3.14.6-1
3.14.6-1
debian/pypy3<=7.3.11+dfsg-2+deb12u3, <=7.3.19+dfsg-2
8.0.1+dfsg-1
debian/python3.11<=3.11.2-6+deb12u8
3.11.2-6+deb12u9
debian/python3.13
3.13.5-2+deb13u53.13.18-1
debian/python3.14
3.14.10-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.12.9-13
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.12.9-12
  3. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 8.0.0+dfsg-1
  4. Upgrade

    Upgrade debian/python3.11 to a version that resolves this vulnerability.

    Fixed in 3.11.2-6+deb12u9
  5. Upgrade

    Upgrade debian/python3.13 to a version that resolves this vulnerability.

    Fixed in 3.13.5-2+deb13u3
  6. Upgrade

    Upgrade debian/python3.14 to a version that resolves this vulnerability.

    Fixed in 3.14.6-1
  7. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 8.0.1+dfsg-1
  8. Upgrade

    Upgrade debian/python3.13 to a version that resolves this vulnerability.

    Fixed in 3.13.5-2+deb13u5Fixed in 3.13.18-1
  9. Upgrade

    Upgrade debian/python3.14 to a version that resolves this vulnerability.

    Fixed in 3.14.10-1
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch CVE-2021-4189
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch CVE-2026-8328
  12. Configuration

    Ensure ftpcp() does not pass the raw attacker-controllable PASV IP/port returned via parse227() directly to target.sendport(); modify ftpcp() so the PASV host is derived from the actual peer address (getpeername()[0]), consistent with the makepasv() fix for CVE-2021-4189.

    CPython ftplib.py (ftpcp/parse227/makepasv) PASV host address source = Use actual peer address getpeername()[0] instead of server-supplied PASV host address

Event History

May 13, 2026
CVE Published
via MITRE·08:14 PM
Data Sourced
via OSV·08:14 PM
DescriptionSeverityWeakness
Data Sourced
via MITRE·08:14 PM
DescriptionWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeakness
May 17, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeaknessAffected Software
Nov 11, 2026
Data Sourced
via OSV·09:47 AM
Affected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2026-8328?

CVE-2026-8328 is considered a high severity vulnerability due to its potential for exploitation through SSRF attacks.

2

How do I fix CVE-2026-8328?

To fix CVE-2026-8328, update to the latest version of Python CPython ftplib where the vulnerability has been addressed.

3

Which versions of Python CPython ftplib are affected by CVE-2026-8328?

CVE-2026-8328 affects specific versions of Python CPython ftplib prior to the security patches that address this issue.

4

What type of attack does CVE-2026-8328 facilitate?

CVE-2026-8328 facilitates Server-Side Request Forgery (SSRF) attacks by trusting server-supplied PASV host addresses.

5

Is CVE-2026-8328 related to previous vulnerabilities?

Yes, CVE-2026-8328 is related to CVE-2021-4189, which involved similar trust issues with PASV addresses.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203