CVE-2026-8328: CWE-918 Server-Side request forgery (SSRF) in Python Software Foundation CPython
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.
AI Analysis
Technical Summary
The ftpcp() function in CPython's ftplib.py module fails to properly sanitize or replace server-supplied PASV host addresses, unlike the patched makepasv() function. This results in ftpcp() passing raw, attacker-controllable IP addresses and ports to the target.sendport() method, enabling server-side request forgery (CWE-918). The vulnerability is related to CVE-2021-4189, which addressed similar issues in makepasv(). The flaw affects CPython versions 3.14.0 and 3.15.0a1. No vendor advisory or patch is currently available to confirm remediation status.
Potential Impact
An attacker can exploit this vulnerability to perform server-side request forgery (SSRF) attacks via the ftpcp() function in CPython's ftplib. This could allow an attacker to cause the server to make arbitrary network requests to internal or external systems, potentially leading to information disclosure or other indirect impacts. The CVSS 4.0 score of 5.9 indicates a medium severity impact with network attack vector, low attack complexity, and partial user interaction required.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is released, users should consider avoiding use of the ftpcp() function or applying manual code review and controls to limit exposure. No vendor-provided temporary or official fixes are currently documented.
CVE-2026-8328: CWE-918 Server-Side request forgery (SSRF) in Python Software Foundation CPython
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.
CVSS v4.0
Score 5.9medium
Affected software
pkg:github/python/cpythonRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ftpcp() function in CPython's ftplib.py module fails to properly sanitize or replace server-supplied PASV host addresses, unlike the patched makepasv() function. This results in ftpcp() passing raw, attacker-controllable IP addresses and ports to the target.sendport() method, enabling server-side request forgery (CWE-918). The vulnerability is related to CVE-2021-4189, which addressed similar issues in makepasv(). The flaw affects CPython versions 3.14.0 and 3.15.0a1. No vendor advisory or patch is currently available to confirm remediation status.
Potential Impact
An attacker can exploit this vulnerability to perform server-side request forgery (SSRF) attacks via the ftpcp() function in CPython's ftplib. This could allow an attacker to cause the server to make arbitrary network requests to internal or external systems, potentially leading to information disclosure or other indirect impacts. The CVSS 4.0 score of 5.9 indicates a medium severity impact with network attack vector, low attack complexity, and partial user interaction required.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is released, users should consider avoiding use of the ftpcp() function or applying manual code review and controls to limit exposure. No vendor-provided temporary or official fixes are currently documented.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-05-11T15:06:00.859Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a04e0c9cbff5d861008115e
Added to database: 05/13/2026, 20:36:25 UTC
Last enriched: 07/06/2026, 23:36:24 UTC
Last updated: 07/31/2026, 19:23:00 UTC
Views: 126
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.