CVE-2026-8328

Description

A flaw was found in the ftplib.py module of Python. This vulnerability allows a remote attacker to bypass a previous security fix by manipulating the ftpcp() function. By supplying a malicious IP address and port, an attacker can redirect FTP connections to an arbitrary host. This could lead to the compromise of data integrity or other network-based attacks.

Statement

A flaw with Important impact was found in the ftplib module of Python, affecting the Python components shipped in Red Hat Hardened Images. The ftpcp() function in Lib/ftplib.py was not updated when CVE-2021-4189 was fixed: although makepasv() was patched to replace server-supplied PASV host addresses with the actual peer address, ftpcp() still calls parse227() directly and passes the raw, attacker-controllable IP address and port to target.sendport(). A remote attacker who controls or has compromised an FTP server can therefore supply a malicious PASV response that redirects the FTP data connection to an arbitrary host, which can compromise data integrity or enable further network-based attacks. Within Red Hat Hardened Images, the python3.10, python3.11, python3.12, python3.13, and python3.14 components are affected; their resolution is delegated to the Red Hat Hardened Images maintainers, and updated packages have been released via errata. The hi/python OCI image is not affected because the vulnerable component is not present in that image. Red Hat rates the overall impact of this flaw as Important, while the CVSS scores assigned by both Red Hat (5.3, CVSS:3.1, Moderate) and upstream (5.9, CVSS:4.0, Moderate) are lower; the vectors differ mainly in that upstream scores the consequence as high integrity impact with user interaction required, whereas the Red Hat vector scores a low confidentiality impact.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.3N/AN/A
Attack VectorNetworkN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityLowN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactNoneN/AN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Understanding the Weakness (CWE)

Confidentiality,Access Control,Availability

Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity; Varies by Context

When security decisions such as authentication and authorization are made based on the values of these inputs, attackers can bypass the security of the product to access whatever is being protected. An attacker could change these inputs using customized clients or other attacks. This change might not be detected. The consequences will depend on the associated functionality, but they can range from granting additional privileges to untrusted users to bypassing important security checks. Ultimately, this weakness may lead to exposure or modification of sensitive data, system crash, or execution of arbitrary code.

Frequently Asked Questions

Want to get errata notifications? Sign up here.