/

CVE-2025-71324

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-73) in Flowise File Download API

CVE-2025-71324

Modified

Vulnerability type

Category:

Path Traversal / Improper File Path Handling

CWE:

CWE-73

Impact:

Arbitrary File Read / Data Exposure

Severity:

HIGH RISK

(7.5)

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 before version 3.0.6 contains an arbitrary file read vulnerability in file download-related API endpoints, where the chatId parameter is used without adequate validation.

By exploiting a path traversal in the storage lookup logic, an unauthenticated attacker can read sensitive files such as the internal SQLite database, exposing stored application data whenever the application runs with default paths and permissions.

Affected context

This vulnerability appears in Flowise deployments that expose the /api/v1/get-upload-file and /api/v1/openai-assistants-file/download endpoints and rely on the default file storage layout.

It is relevant when user-controlled identifiers, such as chatId, are accepted as part of the file selection mechanism and the application runs with sufficient privileges to access configuration and data files on disk.

Environments where the Flowise process user can read sensitive files like /root/.flowise/database.sqlite are particularly at risk, especially in single-tenant setups or default container images.

Exploit preconditions

  • Attack surface: HTTP API endpoints /api/v1/get-upload-file and /api/v1/openai-assistants-file/download.
  • Required access: Network access to the Flowise service; no authentication is required in affected configurations.
  • Trigger point: A request that supplies a crafted chatId value causing path traversal during streamStorageFile() lookups.
  • Why exploitation is possible: The chatId parameter is not validated or normalized, and a fallback path-lookup that omits orgId is evaluated after the storage-directory containment check, enabling traversal beyond the intended storage directory and access to arbitrary readable files.

Why this happens

The underlying issue is improper handling of file paths derived from user-controlled input, mapping to CWE-73: External Control of File Name or Path.

Instead of enforcing strict validation and containment, the code passes the chatId value into streamStorageFile() and then applies a fallback lookup path that does not preserve the original directory constraints.

This insecure pattern allows path segments such as directory traversals to bypass the storage-directory check, leading the file-reading logic to operate on arbitrary locations on the filesystem that the process can reach.

Potential impact

  • Unauthenticated attackers may read the Flowise SQLite database, exposing all stored application content.
  • Attackers could access configuration files and secrets stored under the application's runtime directories.
  • Sensitive logs or credentials cached on disk can be disclosed, enabling broader compromise or lateral movement.
  • Data privacy violations can occur if user conversations, prompts, or other stored artifacts are accessible through the same filesystem.

General mitigation guidance

Effective mitigation focuses on eliminating externally controlled file path usage and enforcing strict containment for file access operations.

Common defensive patterns include:

  • Validating and normalizing identifiers like chatId so they cannot contain path separators or traversal sequences.
  • Resolving requested files against a canonical base directory and rejecting any paths that attempt to escape this directory.
  • Using opaque, server-generated file IDs rather than direct filenames or paths in API parameters.
  • Running the application under a least-privilege account with limited filesystem access and segregating sensitive data from web-exposed storage paths.
  • Applying defense-in-depth controls such as application-level authorization checks on file access requests.

How teams detect issues like this

Organizations can detect similar vulnerabilities by:

  • Applying static analysis rules that flag concatenation of user-controlled input into filesystem APIs (e.g., open, readStream, fs operations).
  • Reviewing code for fallback path logic that bypasses earlier security checks or directory containment validations.
  • Implementing security-focused code review checklists that call out any use of request parameters in file path construction.
  • Using automated scanning tools that simulate path traversal attacks against file-related endpoints and alert on unexpected file disclosure.

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-99pg-hqvx-r4gf
vulncheck.comvulncheck.com/advisories/flowise-arbitrary-file-read-via-chatid-parameter

Frequently asked

questions

No. While the SQLite database is a high-value target, any file readable by the Flowise process user and reachable via path traversal can potentially be accessed.

In the described scenario, exploitation is possible without authentication as long as the attacker can reach the affected API endpoints over the network.

The safest approach is to treat file identifiers as opaque server-side references, strictly validate and normalize them, and enforce canonical base directory constraints so user input cannot influence absolute paths.

Adopt secure coding practices around filesystem access, include path traversal checks in design and code review, enforce least-privilege runtime environments, and integrate static and dynamic security testing into the CI pipeline for any code that reads or writes files.

Find out what's already
exploitable in your codebase.