Skip to main content
EPSS 0.5%top 62%

CVE-2026-8328: CWE-918 Server-Side request forgery (SSRF) in Python Software Foundation CPython

0
Medium
Published: 06/05/2026 (06/05/2026, 10:55:23 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Affected software

Python Software Foundation

CPython

Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.14>=3.14.0 <3.14.6>=3.15.0a1 <3.15.0b2
GitHub Actionsmore threats →ai
python/cpython
pkg:github/python/cpython
Affected versions
=3.14.0=3.15.0
GitHub Actionsmore threats →cve
CPython
pkg:github/CPython
Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.14>=3.14.0 <3.14.6>=3.15.0a1 <3.15.0b2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/13/2026, 13:11:04 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses