Summary
The Apache Airflow FTP provider established FTPS connections with an encrypted control channel but failed to enable encryption on the data channel.
As a result, any deployment using FTPSHook or FTPSFileTransmitOperator sent file contents and credentials over the network in cleartext, exposing them to attackers who can monitor the data connection.
Affected context
This vulnerability occurs in Apache Airflow deployments that rely on the FTP provider's FTPSHook or FTPSFileTransmitOperator to transfer files over FTPS.
The issue manifests when TLS is only applied to the control channel while the data channel remains unprotected, which can happen in environments where operators assume FTPS implies full-channel encryption by default.
It is most relevant in networks where traffic on the data connection can be observed or captured by intermediaries, such as shared infrastructure, load-balanced environments, or untrusted network segments.
Exploit preconditions
- Attack surface: Network traffic between the Airflow worker and the FTPS server
- Required access: Ability to observe or capture packets on the FTPS data connection (e.g., on-path or same-network attacker)
- Trigger point: Execution of tasks using FTPSHook or FTPSFileTransmitOperator to send or retrieve files
- Why exploitation is possible: The implementation creates an FTP_TLS session but does not issue
PROT P, leaving the data channel unencrypted; attackers on the network can read cleartext file contents and credentials as they traverse the data connection.
Why this happens
The underlying issue is a misconfiguration of transport security for a protocol with multiple channels.
FTPS requires explicit negotiation of encryption modes; protecting only the control channel without enabling protection for the data channel leaves sensitive payloads exposed despite the presence of TLS.
This maps to CWE-319: Cleartext Transmission of Sensitive Information, where data that should be protected with cryptographic mechanisms is sent in plaintext due to incomplete or incorrect use of secure transport features.
Potential impact
- Network attackers may read file contents transmitted via FTPSHook or FTPSFileTransmitOperator.
- Credentials used for file transfers (such as usernames and passwords) can be captured in transit.
- Sensitive business data, configuration files, or logs could be exposed to unauthorized parties.
- Captured credentials can enable further unauthorized access to FTP/FTPS servers or related systems.
General mitigation guidance
Mitigation focuses on ensuring that all protocol channels carrying sensitive data are consistently protected and that secure defaults are applied.
Recommended patterns include:
- Configuring FTPS sessions to explicitly enable encryption on both control and data channels, using protocol options like
PROT Pwhere required. - Treating network credentials and file payloads as sensitive, ensuring they always traverse authenticated, encrypted channels (e.g., TLS, SSH).
- Centralizing connection logic so that transport settings cannot be accidentally overlooked by individual hooks or operators.
- Applying least-privilege principles to service accounts and limiting the scope of credentials used for file transfers to reduce impact if exposure occurs.
- Favoring protocols and libraries that default to full-channel encryption and provide clear semantics for secure configuration.
How teams detect issues like this
Effective detection combines configuration review with traffic and code analysis:
- Review Airflow DAGs and operators to identify use of FTPSHook or FTPS-like constructs and confirm that all channels are configured to use encryption.
- Use static analysis or custom lint rules to flag network code that configures FTPS/FTP_TLS without explicit data-channel protection or secure mode settings.
- Inspect network monitoring or packet captures to confirm that file transfer payloads and credentials are not visible in cleartext during FTPS operations.
- Enforce security policies that require documented use of encrypted transport for any credential or file transfer, backed by automated checks in CI pipelines.

