Langflow Directory Traversal Vulnerability Allowing Secret Key Exposure

Vulnerability

A directory traversal vulnerability has been identified in Langflow versions prior to 1.7.1. The issue arises in the 'download_profile_picture' function of the '/profile_pictures/{folder_name}/{file_name}' endpoint, where the 'folder_name' and 'file_name' parameters are not properly validated. This lack of strict filtering enables the reading of the 'secret_key' across different directories. The 'secret_key' is crucial for JWT authentication, and its exposure could allow attackers to forge authentication tokens and gain unauthorized access to the system.

Impact

Exposing the 'secret_key' used for JWT authentication could lead to unauthorized access by allowing attackers to forge authentication tokens and log into the system.

Reproduction

The vulnerability can be reproduced by sending a request to the '/api/v1/files/profile_pictures/../secret_key' endpoint. This can be done using a tool like 'curl', with the '--path-as-is' option to bypass normal path sanitization and access the 'secret_key' file.

Remediation

Users are advised to update Langflow to version 1.7.1 or later, where this vulnerability has been patched.

Added: Mar 24, 2026, 2:34 PM
Updated: Mar 24, 2026, 2:34 PM

Vulnerability Rating

Custom Algorithm
spread
2.6
impact
5.0
exploitability
9.1
remediation
7.7
relevance
4.6
threat
6.4
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.