Mar 27, 2026 • Joshua Martinelle
Langflow - Path Traversal Arbitrary File Write via upload_user_file
A critical path traversal vulnerability exists in Langflow, affecting the POST /api/v2/files endpoint. Insufficient sanitization of the filename parameter in...
Executive Summary
A critical path traversal vulnerability exists in Langflow, affecting the POST /api/v2/files endpoint. Insufficient sanitization of the filename parameter in multipart form data enables attackers to use path traversal sequences for arbitrary file writes on the host filesystem. This Arbitrary File Write capability poses severe risks, potentially allowing unauthorized code execution, configuration manipulation, or persistent access. While no specific threat actors are currently attributed to exploiting this flaw, the severity warrants immediate attention. Organizations deploying Langflow must prioritize patching or implementing strict input validation controls on file upload mechanisms. Mitigation strategies include sanitizing user inputs, restricting file write permissions, and monitoring for suspicious file creation activities. Immediate remediation is recommended to prevent potential compromise of underlying infrastructure and data integrity.
Summary
Langflow - Path Traversal Arbitrary File Write via upload_user_file The 'POST /api/v2/files' endpoint does not sanitize the 'filename' parameter from the multipart form data, allowing an attacker to write files to arbitrary locations on the filesystem using path traversal sequences ('../'). Joshua Martinelle Fri, 03/27/2026 - 10:51
Published Analysis
A critical path traversal vulnerability exists in Langflow, affecting the POST /api/v2/files endpoint. Insufficient sanitization of the filename parameter in multipart form data enables attackers to use path traversal sequences for arbitrary file writes on the host filesystem. This Arbitrary File Write capability poses severe risks, potentially allowing unauthorized code execution, configuration manipulation, or persistent access. While no specific threat actors are currently attributed to exploiting this flaw, the severity warrants immediate attention. Organizations deploying Langflow must prioritize patching or implementing strict input validation controls on file upload mechanisms. Mitigation strategies include sanitizing user inputs, restricting file write permissions, and monitoring for suspicious file creation activities. Immediate remediation is recommended to prevent potential compromise of underlying infrastructure and data integrity. Langflow - Path Traversal Arbitrary File Write via upload_user_file The 'POST /api/v2/files' endpoint does not sanitize the 'filename' parameter from the multipart form data, allowing an attacker to write files to arbitrary locations on the filesystem using path traversal sequences ('../'). Joshua Martinelle Fri, 03/27/2026 - 10:51 Langflow - Path Traversal Arbitrary File Write via upload_user_file The 'POST /api/v2/files' endpoint does not sanitize the 'filename' parameter from the multipart form data, allowing an attacker to write files to arbitrary locations on the filesystem using path traversal sequences ('../'). Joshua Martinelle Fri, 03/27/2026 - 10:51