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

> Authenticated attackers can read arbitrary files via the ReadFileTool, potentially leading to remote command execution.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Oct 2025

## What is GHSA-j44m-5v8f-gc9c?

GHSA-j44m-5v8f-gc9c is a path traversal vulnerability in flowise, published on 10 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Summary

The ReadFileTool in Flowise does not restrict file path access, allowing authenticated attackers to exploit this vulnerability to read arbitrary files from the file system, potentially leading to remote command execution.

### Details

Flowise supports providing ReadFileTool for large models to read files in the server's file system. The implementation of this tool is located at packages/components/nodes/tools/ReadFile/ReadFile.ts.

```
/**
 * Class for reading files from the disk. Extends the StructuredTool
 * class.
 */
export class ReadFileTool extends StructuredTool {
    static lc_name() {
        return 'ReadFileTool'
    }

    schema = z.object({
        file_path: z.string().describe('name of file')
    }) as any

    name = 'read_file'

    description = 'Read file from disk'

    store: BaseFileStore

    constructor({ store }: ReadFileParams) {
        super(...arguments)

        this.store = store
    }

    async _call({ file_path }: z.infer<typeof this.schema>) {
        return await this.store.readFile(file_path)
    }
}
```

The tool directly uses the file_path parameter passed to it without verifying whether the path belongs to Flowise's working directory. Authenticated attackers can exploit this vulnerability to read any known file on the server. For example, if the victim deploys in a Docker environment, the attacker could attempt to read sensitive files such as /root/.flowise/encryption.key, /root/.flowise/database.sqlite, and obtain sensitive information. If the victim does not use a Docker environment for deployment, the attacker could try reading sensitive files like /etc/passwd, /etc/shadow, /root/.ssh/id_rsa, further achieving the effect of remote command execution.

### PoC

This file reading vulnerability has been verified to exist in the latest Flowise Docker image (https://hub.docker.com/layers/flowiseai/flowise/latest/images/sha256-26300377397818a451e0710389eb77615256b0f3ecc895194850ab35dda3ae7b). The reproduction steps are as follows:

1. Pull the Flowise Docker image

```
docker pull flowiseai/flowise
```

2. Start the Flowise service

```
docker run -d --name flowise -p 3000:3000 flowise
```

3. Access the Flowise service at server ip:3000 in the browser and register an account
4. Save the following content as agent.json

```
{
  "nodes": [
    {
      "id": "startAgentflow_0",
      "type": "agentFlow",
      "position": {
        "x": -203,
        "y": 37
      },
      "data": {
        "id": "startAgentflow_0",
        "label": "Start",
        "version": 1.1,
        "name": "startAgentflow",
        "type": "Start",
        "color": "#7EE787",
        "hideInput": true,
        "baseClasses": [
          "Start"
        ],
        "category": "Agent Flows",
        "description": "Starting point of the agentflow",
        "inputParams": [
          {
            "label": "Input Type",
            "name": "startInputType",
            "type": "options",
            "options": [
              {
                "label": "Chat Input",
                "name": "chatInput",
                "description": "Start the conversation with chat input"
              },
              {
                "label": "Form Input",
                "name": "formInput",
                "description": "Start the workflow with form inputs"
              }
            ],
            "default": "chatInput",
            "id": "startAgentflow_0-input-startInputType-options",
            "display": true
          },
          {
            "label": "Form Title",
            "name": "formTitle",
            "type": "string",
            "placeholder": "Please Fill Out The Form",
            "show": {
              "startInputType": "formInput"
            },
            "id": "startAgentflow_0-input-formTitle-string",
            "display": false
          },
          {
            "label": "Form Description",
            "name": "formDescription",
            "type": "string",
            "placeholder": "Complete all fields below to continue",
            "show": {
              "startInputType": "formInput"
            },
            "id": "startAgentflow_0-input-formDescription-string",
            "display": false
          },
          {
            "label": "Form Input Types",
            "name": "formInputTypes",
            "description": "Specify the type of form input",
            "type": "array",
            "show": {
              "startInputType": "formInput"
            },
            "array": [
              {
                "label": "Type",
                "name": "type",
                "type": "options",
                "options": [
                  {
                    "label": "String",
                    "name": "string"
                  },
                  {
                    "label": "Number",
                    "name": "number"
                  },
                  {
                    "label": "Boolean",
                    "name": "boolean"
                  },
                  {
                    "label": "Options",
                    "name": "options"
                  }
                ],
                "default": "string"
              },
              {
                "label": "Label",
                "name": "label",
                "type": "string",
                "placeholder": "Label for the input"
              },
              {
                "label": "Variable Name",
                "name": "name",
                "type": "string",
                "placeholder": "Variable name for the input (must be camel case)",
                "description": "Variable name must be camel case. For example: firstName, lastName, etc."
              },
              {
                "label": "Add Options",
                "name": "addOptions",
                "type": "array",
                "show": {
                  "formInputTypes[$index].type": "options"
                },
                "array": [
                  {
                    "label": "Option",
                    "name": "option",
                    "type": "string"
                  }
                ]
              }
            ],
            "id": "startAgentflow_0-input-formInputTypes-array",
            "display": false
          },
          {
            "label": "Ephemeral Memory",
            "name": "startEphemeralMemory",
            "type": "boolean",
            "description": "Start fresh for every execution without past chat history",
            "optional": true,
            "id": "startAgentflow_0-input-startEphemeralMemory-boolean",
            "display": true
          },
          {
            "label": "Flow State",
            "name": "startState",
            "description": "Runtime state during the execution of the workflow",
            "type": "array",
            "optional": true,
            "array": [
              {
                "label": "Key",
                "name": "key",
                "type": "string",
                "placeholder": "Foo"
              },
              {
                "label": "Value",
                "name": "value",
                "type": "string",
                "placeholder": "Bar",
                "optional": true
              }
            ],
            "id": "startAgentflow_0-input-startState-array",
            "display": true
          },
          {
            "label": "Persist State",
            "name": "startPersistState",
            "type": "boolean",
            "description": "Persist the state in the same session",
            "optional": true,
            "id": "startAgentflow_0-input-startPersistState-boolean",
            "display": true
          }
        ],
        "inputAnchors": [],
        "inputs": {
          "startInputType": "chatInput",
          "formTitle": "",
          "formDescription": "",
          "formInputTypes": "",
          "startEphemeralMemory": "",
          "startState": "",
          "startPersistState

## Which versions are affected by GHSA-j44m-5v8f-gc9c?

4 open source packages ship an affected version, including flowise and flowise-components.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `flowise` | npm | All versions | 3.0.8 |
| `flowise` | npm | All versions | 3.0.8 |
| `flowise-components` | npm | All versions | 3.0.8 |
| `flowise-components` | npm | All versions | 3.0.8 |

## How do I fix GHSA-j44m-5v8f-gc9c?

Upgrade flowise to 3.0.8 or later.

## Is GHSA-j44m-5v8f-gc9c being exploited?

There is no known exploitation of GHSA-j44m-5v8f-gc9c in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-j44m-5v8f-gc9c and fix it if it is affected.

What it is: GHSA-j44m-5v8f-gc9c is a path traversal vulnerability in flowise, published on 10 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-j44m-5v8f-gc9c in the wild and no public exploit code.

Affected packages and fixed versions:
- flowise (npm): affected all versions; fixed in 3.0.8
- flowise (npm): affected all versions; fixed in 3.0.8
- flowise-components (npm): affected all versions; fixed in 3.0.8
- flowise-components (npm): affected all versions; fixed in 3.0.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-j44m-5v8f-gc9c/ (Markdown: https://insights.sbomify.com/GHSA-j44m-5v8f-gc9c/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-j44m-5v8f-gc9c

---
From sbomify Insights: https://insights.sbomify.com/GHSA-j44m-5v8f-gc9c/
Summaries are generated and may contain mistakes; the official description above is the record.
