Summary
In the download_profile_picture function of the /profile_pictures/{folder_name}/{file_name} endpoint, the folder_name and file_name parameters are not strictly filtered, which allows the secret_key to be read across directories.
Details
src/backend/base/langflow/api/v1/files.py

storage local get_file, directly concatenate flow_id and file_name

PoC
curl --path-as-is 'http://127.0.0.1:7860/api/v1/files/profile_pictures/../secret_key'
QNuonm***********
Impact
secret_key is used for jwt authentication. Attackers can forge authentication tokens and log into the system.
References
Summary
In the download_profile_picture function of the /profile_pictures/{folder_name}/{file_name} endpoint, the folder_name and file_name parameters are not strictly filtered, which allows the secret_key to be read across directories.
Details
src/backend/base/langflow/api/v1/files.py
storage local get_file, directly concatenate flow_id and file_name

PoC
curl --path-as-is 'http://127.0.0.1:7860/api/v1/files/profile_pictures/../secret_key'QNuonm***********Impact
secret_key is used for jwt authentication. Attackers can forge authentication tokens and log into the system.
References