Skip to content
CriticalVulnerability

GHSA-g2j9-7rj2-gm6c: Langflow has an Arbitrary File Write (RCE) via v2 API

Published
Record updated
View JSON
Affected
  • langflow >= 1.2.0, <= 1.8.1
Fixed in
1.9.0
  • released April 14, 2026, 26 days after disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
13.5%

Summary

GHSA-g2j9-7rj2-gm6c reports an Arbitrary File Write in Langflow via the POST /api/v2/files/ endpoint. The multipart upload filename is passed unchecked to LocalStorageService, which lacks a containment check, so an authenticated attacker can write files anywhere on the host, potentially leading to Remote Code Execution. The reporter tested this against langflowai/langflow:latest (v1.7.3).

Mitigation

Sanitize the multipart filename before processing by stripping directory components with pathlib's name attribute and rejecting empty names or names containing ".." with HTTP 400. Also add a canonical path containment check inside LocalStorageService.save_file.