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 vulnerability exists in the ftpcp() function in Lib/ftplib.py of CPython, which did not receive the same security update as makepasv() when addressing CVE-2021-4189. Specifically, ftpcp() calls parse227() directly and passes the raw, attacker-controllable IP address and port to target.sendport(), enabling server-side request forgery. This could allow an attacker to induce the client to send requests to arbitrary IP addresses and ports. The CVSS 4.0 score is 5.9 (medium severity), reflecting network attack vector, low attack complexity, partial attack traceability, no privileges required, user interaction needed, no confidentiality or availability impact, but high integrity impact.
Potential Impact
An attacker can manipulate the ftpcp() function to cause the client to send network requests to arbitrary IP addresses and ports, potentially leading to unauthorized internal network access or other unintended interactions. The integrity of the client’s network communications can be compromised. There is no direct impact on confidentiality or availability according to the CVSS vector.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. No official fix or patch links are currently provided. Until a patch is available, users should exercise caution when using the ftpcp() function with untrusted FTP servers or inputs. Monitor official Python security advisories for updates.
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
Python Software Foundation
CPython
pkg:github/python/cpythonpkg:github/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 vulnerability exists in the ftpcp() function in Lib/ftplib.py of CPython, which did not receive the same security update as makepasv() when addressing CVE-2021-4189. Specifically, ftpcp() calls parse227() directly and passes the raw, attacker-controllable IP address and port to target.sendport(), enabling server-side request forgery. This could allow an attacker to induce the client to send requests to arbitrary IP addresses and ports. The CVSS 4.0 score is 5.9 (medium severity), reflecting network attack vector, low attack complexity, partial attack traceability, no privileges required, user interaction needed, no confidentiality or availability impact, but high integrity impact.
Potential Impact
An attacker can manipulate the ftpcp() function to cause the client to send network requests to arbitrary IP addresses and ports, potentially leading to unauthorized internal network access or other unintended interactions. The integrity of the client’s network communications can be compromised. There is no direct impact on confidentiality or availability according to the CVSS vector.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. No official fix or patch links are currently provided. Until a patch is available, users should exercise caution when using the ftpcp() function with untrusted FTP servers or inputs. Monitor official Python security advisories for updates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-05-11T15:06:00.859Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a04e0c9cbff5d861008115e
Added to database: 05/13/2026, 20:36:25 UTC
Last enriched: 08/13/2026, 13:11:04 UTC
Last updated: 09/13/2026, 22:01:38 UTC
Views: 153
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.