Miggo Logo

GHSA-j44m-5v8f-gc9c: Flowise is vulnerable to arbitrary file exposure through its ReadFileTool

7.7

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
10/10/2025
Updated
10/10/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
flowisenpm< 3.0.83.0.8
flowise-componentsnpm< 3.0.83.0.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a classic path traversal issue (CWE-22) within the ReadFileTool component of Flowise. The root cause is the lack of input validation on the file_path parameter provided by the user.

The analysis of the provided patch commit 1fb12cd93143592a18995f63b781d25b354d48a3 reveals the two key functions involved in the vulnerability:

  1. ReadFile_Tools.init: This function was responsible for setting up the tool. In its vulnerable state, it instantiated a langchain/stores/file/node.NodeFileStore without any path restrictions. This created an insecure context for file operations.

  2. ReadFileTool._call: This is the function that executes the file reading operation. It takes the user-controlled file_path and passes it directly to the readFile method of the store object configured by the init function. Because the store was insecure, this function could be used to read any file on the server's file system, leading to the exposure of sensitive information like encryption keys, database files, or system files.

The patch addresses this by introducing a new SecureFileStore class which explicitly validates file paths to ensure they are within a defined workspace directory and do not contain traversal sequences (../). The ReadFile_Tools.init function was updated to use this new secure class, effectively mitigating the vulnerability by ensuring all file read operations are sandboxed.

Vulnerable functions

ReadFileTool._call
packages/components/nodes/tools/ReadFile/ReadFile.ts
This function is the primary sink for the vulnerability. It directly uses the user-provided `file_path` to read a file via the `this.store.readFile` method. In the vulnerable version, the `store` object was an insecure `NodeFileStore` instance that performed no path validation, thus allowing an attacker to specify an arbitrary path and read any file on the filesystem that the application process has permissions to access.
ReadFile_Tools.init
packages/components/nodes/tools/ReadFile/ReadFile.ts
This function was responsible for initializing the `ReadFileTool`. In the vulnerable version, it created an instance of `NodeFileStore` without any security restrictions (like a sandboxed base path) and passed it to the `ReadFileTool`. This insecure setup is what enabled the `_call` method to be exploited for arbitrary file reads. The patch replaces this with the creation of a `SecureFileStore` which enforces path restrictions.

WAF Protection Rules

WAF Rule

### Summ*ry T** R****il*Tool in *lowis* *o*s not r*stri*t *il* p*t* ****ss, *llowin* *ut**nti**t** *tt**k*rs to *xploit t*is vuln*r**ility to r*** *r*itr*ry *il*s *rom t** *il* syst*m, pot*nti*lly l***in* to r*mot* *omm*n* *x**ution. ### **t*ils *

Reasoning

T** vuln*r**ility is * *l*ssi* p*t* tr*v*rs*l issu* (*W*-**) wit*in t** `R****il*Tool` *ompon*nt o* *lowis*. T** root **us* is t** l**k o* input v*li**tion on t** `*il*_p*t*` p*r*m*t*r provi*** *y t** us*r. T** *n*lysis o* t** provi*** p*t** *ommit