/

CVE-2025-71334

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-73) in Flowise File Storage APIs

CVE-2025-71334

Modified

Vulnerability type

Category:

Path Traversal / Arbitrary File Access

CWE:

CWE-73

Impact:

Arbitrary File Read/Write and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Flowise contains an arbitrary file access issue where chatflowId and chatId parameters are not validated as UUIDs or numeric identifiers before being used in file system operations.

An unauthenticated attacker can leverage path traversal values to read and write arbitrary files via exposed API endpoints, which can ultimately lead to remote code execution when writable paths are abused.

Affected context

This vulnerability occurs in Flowise deployments that expose the /api/v1/chatflows, /api/v1/get-upload-file, and /api/v1/openai-assistants-file/download endpoints without additional access controls.

It is triggered when the application accepts unvalidated chatflowId and chatId parameters and uses them directly to construct storage file paths.

Environments where the application process can access sensitive directories or write to executable locations are especially at risk, though exact impact depends on host configuration and deployment hardening.

Exploit preconditions

  • Attack surface: Publicly accessible HTTP API endpoints:
  • /api/v1/chatflows (via addBase64FilesToStorage)
  • /api/v1/get-upload-file
  • /api/v1/openai-assistants-file/download (via streamStorageFile)
  • Required access: No authentication is required if these endpoints are exposed as described; attacker only needs network access to the Flowise instance.
  • Trigger point: Supplying crafted chatflowId or chatId values containing path traversal sequences (e.g., ../../../../../tmp) in API requests.
  • Why exploitation is possible: The application fails to validate or constrain these identifiers to expected formats (UUIDs or numbers) and uses them directly to build file system paths, allowing navigation outside the intended storage directory and arbitrary file read/write.

Why this happens

The root cause is improper neutralization of input used in file paths, mapped to CWE-73: External Control of File Name or Path.

Instead of treating chatflowId and chatId as opaque identifiers and enforcing strict validation and directory constraints, the code composes file system paths using these untrusted parameters.

This pattern allows attackers to introduce relative path components (../) or absolute paths, escaping the intended storage area and interacting with files elsewhere on the server's filesystem.

Potential impact

  • An attacker may read arbitrary files accessible to the Flowise process, including configuration files, credentials, or logs.
  • An attacker may write arbitrary files to locations writable by the application, potentially planting backdoors or modifying application behavior.
  • Arbitrary file write could lead to remote code execution if written files are later interpreted as code, scripts, or configuration by the system.
  • The attacker could exfiltrate sensitive data or tamper with stored application data and user content.

General mitigation guidance

Mitigation should focus on strictly constraining file path construction and reducing trust in user-supplied identifiers.

Common defensive patterns include:

  • Validating chatflowId and chatId as well-formed UUIDs or numeric IDs, rejecting any value that does not match expected patterns.
  • Using application-level storage keys and mapping them to filesystem locations internally, rather than allowing direct path influence from client input.
  • Enforcing a fixed base directory for file operations and preventing navigation outside it by normalizing paths and checking for traversal sequences.
  • Running the application with least-privilege filesystem permissions, limiting readable and writable areas to dedicated storage directories.
  • Separating executable code paths from user-controlled storage directories to reduce the chance that written files are executed.

How teams detect issues like this

Detection efforts can leverage a combination of code-level and runtime signals:

  • Static analysis rules that flag concatenation of request parameters into filesystem paths or calls to file APIs without prior validation.
  • Code review checklists that highlight any use of IDs or path fragments from HTTP parameters in file operations, and verify that inputs are normalized and constrained.
  • Logging and monitoring of file access patterns, including unusual traversal into system directories or unexpected write operations from API flows.
  • Security policies in CI/CD pipelines that require validation routines for resource identifiers and restrict direct use of user input in I/O paths.
  • Optional use of automated application security testing tools that simulate path traversal payloads against file-related endpoints.

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/commit/8bd3de41533de78e4ef6c980e5704a1f9cb7ae6f
github.comgithub.com/FlowiseAI/Flowise/commit/c2b830f279e454e8b758da441016b2234f220ac7
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-q67q-549q-p849
vulncheck.comvulncheck.com/advisories/flowise-arbitrary-file-access-via-missing-chat-flow-id-validation

Frequently asked

questions

Yes. If the affected endpoints are exposed over the network without additional authentication or filtering, an attacker can exploit the issue remotely by sending crafted API requests.

The attacker only needs network access to the Flowise instance. No valid account is required if the endpoints are reachable anonymously, making this particularly severe in internet-facing deployments.

The most robust fix is to treat chatflowId and chatId as strict identifiers, validate them to the expected UUID or numeric format, and map them to internal storage keys rather than file paths. File operations should always be constrained to a fixed, trusted base directory with normalized paths and checks that reject traversal.

Adopt a secure-by-default file handling strategy: avoid constructing filesystem paths directly from user input, enforce strict validation and canonicalization for any identifiers, isolate user-controlled storage from executable code, and include file path usage checks in code review and automated security testing.

Find out what's already
exploitable in your codebase.