CRITICAL 9.1
PYSEC-2026-218
Details
A path traversal in the SFTP provider (`SFTPHook.retrieve_directory` / `SFTPOperator(operation=get)`) let a malicious or compromised remote SFTP server write files outside the configured local destination directory via crafted directory-entry names. No Airflow account is required — the attack surface is any deployment downloading directories from an untrusted SFTP server. Upgrade `apache-airflow-providers-sftp` to 5.8.1 or later.
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI / apache-airflow-providers-sftp
Introduced in:
0 Fixed in: 5.8.1 Fix
pip install --upgrade 'apache-airflow-providers-sftp>=5.8.1'