/

CVE-2025-71333

Severity:

CRITICAL RISK

(9.8)

Arbitrary File Upload (CWE-73) in Flowise Local Storage

CVE-2025-71333

Analyzed

Vulnerability type

Category:

Arbitrary File Upload / Path Traversal

CWE:

CWE-73

Impact:

Remote Code Execution and Server Compromise

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 up to version 2.2.4 exposes an unauthenticated arbitrary file upload flaw in the /api/v1/attachments endpoint when storageType is configured as local.

By abusing path traversal in chatId and chatflowId, an attacker can place malicious files into arbitrary server directories, which may lead to remote code execution and full server compromise.

Affected context

This vulnerability arises in Flowise deployments that use the local filesystem for attachment storage (storageType=local) and expose the /api/v1/attachments API endpoint.

It is most relevant where the application trusts user-supplied identifiers such as chatId and chatflowId to construct filesystem paths without strong normalization or containment checks.

Environments that allow web-accessible or executable files to be written under the application's directory structure are at heightened risk.

Exploit preconditions

  • Attack surface: HTTP API endpoint /api/v1/attachments reachable over the network
  • Required access: No authentication required; the endpoint is exploitable by any party that can send requests to the Flowise server
  • Trigger point: File upload requests where storageType is set to local and attacker-controlled chatId / chatflowId values are used to build target paths
  • Why exploitation is possible: The application fails to safely constrain or validate path components derived from user input, allowing directory traversal and placement of files outside the intended storage area

Why this happens

The core issue is the use of user-controlled values (chatId, chatflowId) in filesystem path construction without robust validation or normalization.

This maps to CWE-73: External Control of File Name or Path, where external input directly influences file system locations, bypassing directory boundaries and trust assumptions.

When combined with an arbitrary file upload capability, this insecure pattern enables attackers to write hostile content into sensitive directories, creating opportunities for code execution or data tampering depending on server configuration.

Potential impact

  • Attackers may upload web shells or executable scripts that can be triggered for remote code execution.
  • Malicious files could be placed in configuration or data directories, enabling application tampering or data corruption.
  • Log files or security controls can be bypassed or poisoned by crafted uploads.
  • The server's integrity could be compromised, allowing lateral movement to other systems or services.
  • Sensitive data may be exposed if attackers place or overwrite files in publicly accessible directories.

General mitigation guidance

Mitigation generally focuses on removing direct control of filesystem paths from untrusted inputs and constraining where uploads can land.

Common defensive patterns include:

  • Strictly mapping logical identifiers (like chatId and chatflowId) to pre-defined, internal directory names rather than using them directly in paths.
  • Normalizing and validating all path components, rejecting any input containing traversal sequences (e.g., ../) or absolute path indicators.
  • Enforcing an uploads-only root directory with strong containment checks to prevent escaping into other parts of the filesystem.
  • Treating uploaded files as non-executable data by default (e.g., using separate, non-executable storage locations and disabling script execution).
  • Applying least-privilege file system permissions to the application process so it cannot write to sensitive system or application directories.

How teams detect issues like this

High-level detection typically involves:

  • Static analysis rules that flag direct concatenation of user input into file paths or calls to file APIs without prior normalization checks.
  • Code review practices that focus on upload handlers and filesystem operations, ensuring path construction uses safe, centralized utilities.
  • Runtime monitoring and logging for unusual file creation patterns, especially files appearing outside designated upload directories or with executable extensions.
  • Security policies that require automated scanning of web-accessible directories for unexpected scripts or binaries, and integration of these checks into CI/CD workflows.

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-h42x-xx2q-6v6g
vulncheck.comvulncheck.com/advisories/flowise-arbitrary-file-upload-via-unauthenticated-api-v1-attachments-endpoint

Frequently asked

questions

It is broadly exploitable wherever the Flowise /api/v1/attachments endpoint is network-accessible and storageType is configured as local, because no authentication is required to attempt exploitation.

An attacker only needs the ability to send HTTP requests to the vulnerable Flowise instance; no valid user account or elevated privileges are required to upload files with crafted paths.

The safest pattern is to decouple user input from filesystem paths entirely: use internal mappings for directory names, enforce strict containment within a dedicated upload root, and treat all uploaded files as non-executable data stored in non-executable locations.

Future prevention relies on consistently validating and normalizing all path-related inputs, centralizing filesystem access in vetted utility functions, and enforcing architectural rules that forbids direct use of untrusted data in path construction or executable locations.

Find out what's already
exploitable in your codebase.