Where
-Infinity
0
Severity
10
EPSS
0.07%
Path Traversal, Code Injection
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Summary

While reviewing the recent patch for CVE-2025-68478 (External Control of File Name in v1.7.1), I discovered that the root architectural issue within LocalStorageService remains unresolved. Because the underlying storage layer lacks boundary containment checks, the system relies entirely on the HTTP-layer ValidatedFileName dependency.

This defense-in-depth failure leaves the POST /api/v2/files/ endpoint vulnerable to Arbitrary File Write. The multipart upload filename bypasses the path-parameter guard, allowing authenticated attackers to write files anywhere on the host system, leading to Remote Code Execution (RCE).

Details The vulnerability exists in two layers:

1. API Layer (src/backend/base/langflow/api/v2/files.py:162): Inside the uploaduserfile route, the filename is extracted directly from the multipart Content-Disposition header (newfilename = file.filename). It is passed verbatim to the storage service. ValidatedFileName provides zero protection here as it only guards URL path parameters. 2. Storage Layer (src/backend/base/langflow/services/storage/local.py:114-116): The LocalStorageService uses naive path concatenation (filepath = folderpath / filename). It lacks a resolve().isrelativeto(basedir) containment check.

Recommended Fix:

1. Sanitize the multipart filename before processing:

python from pathlib import Path as StdPath newfilename = StdPath(file.filename or "").name # Strips directory traversal characters if not newfilename or ".." in newfilename: raise HTTPException(statuscode=400, detail="Invalid file name")

2. Add a canonical path containment check inside LocalStorageService.savefile to permanently kill this vulnerability class.

PoC This Python script verifies the vulnerability against langflowai/langflow:latest (v1.7.3) by writing a file outside the user's UUID storage directory.

python import requests

BASEURL = "http://localhost:7860" Authenticate to get a valid JWT token = requests.post(f"{BASEURL}/api/v1/login", data={"username": "admin", "password": "admin"}).json()["accesstoken"]

Payload using directory traversal in the multipart filename TRAVERSALFILENAME = "../../traversalproof.txt" SENTINELCONTENT = b"CVERESEARCHSENTINELKEY"

resp = requests.post( f"{BASEURL}/api/v2/files/", headers={"Authorization": f"Bearer {token}"}, files={"file": (TRAVERSALFILENAME, SENTINELCONTENT, "text/plain")}, )

print(f"Status: {resp.statuscode}") # Returns 201 The file is successfully written to /app/data/.cache/langflow/traversalproof.txt

Server Logs: 2026-02-19T10:04:54.031888Z [info ] File ../traversalproof.txt saved successfully in flow 3668bcce-db6c-4f58-834c-f49ba0024fcb. 2026-02-19T10:05:51.792520Z [info ] File secretimage.png saved successfully in flow 3668bcce-db6c-4f58-834c-f49ba0024fcb. Docker cntainer file: user@40416f6848f2:~/.cache/langflow$ ls 3668bcce-db6c-4f58-834c-f49ba0024fcb profilepictures secretkey traversalproof.txt

Impact Authenticated Arbitrary File Write. An attacker can overwrite critical system files, inject malicious Python components, or overwrite .ssh/authorizedkeys to achieve full Remote Code Execution on the host server.

1 / 2
Source: GitHub
First published (updated )
Severity
9.6
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H

Summary Langflow is vulnerable to Path Traversal in the Knowledge Bases API (DELETE /api/v1/knowledgebases). This occurs because user-supplied knowledge base names are concatenated directly into file paths without proper sanitization or boundary validation. An authenticated attacker can exploit this flaw to delete arbitrary directories anywhere on the server's filesystem, leading to data loss and potential service disruption.

Details The vulnerability exists in the deleteknowledgebasesbulk function within src/backend/base/langflow/api/v1/knowledgebases.py.

This function constructs file paths directly from the user-supplied kbnames parameter. While other knowledge base endpoints safely route through standard path resolution (e.g., resolvekbpath()), the bulk delete handler bypasses this entirely. It builds the path manually and passes it directly to shutil.rmtree() without validating if the resulting path resolves outside the intended user directory.

PoC (Proof of Concept) For the Bulk Delete endpoint, an authenticated attacker can supply a traversal sequence in the kbnames parameter: ../victimuser/kbname

Because the path is passed directly to shutil.rmtree() without containment checks, this payload deletes directories outside the intended scope.

Impact Any Langflow instance exposing this endpoint to authenticated users is vulnerable. This exposes the server to: Cross-user data compromise: Deletion of directories within another tenant's knowledge base space. Arbitrary filesystem manipulation: Directory deletion at any path on the server where the application has write permissions. Service disruption & Data Loss: Deletion of critical application files or unrecoverable data loss if backups are co-located on the same filesystem.

Fixes The issue was addressed in PR #12243, which applies Path.resolve() to normalize the supplied path and validates that it starts with the authenticated user's directory before deletion. Subsequent updates (backported from PR #12337) introduced robust containment checks using Path.isrelativeto() to prevent prefix-ambiguity bugs.

Acknowledgements Thanks to the security researchers who responsibly disclosed this vulnerability: @ddlxstudio @nekros1xx

1 / 2
Source: GitHub
First published (updated )
Severity
9.6
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H

Summary Langflow is vulnerable to Path Traversal in the Knowledge Bases API (DELETE /api/v1/knowledgebases). This occurs because user-supplied knowledge base names are concatenated directly into file paths without proper sanitization or boundary validation. An authenticated attacker can exploit this flaw to delete arbitrary directories anywhere on the server's filesystem, leading to data loss and potential service disruption.

Details The vulnerability exists in the deleteknowledgebasesbulk function within src/backend/base/langflow/api/v1/knowledgebases.py.

This function constructs file paths directly from the user-supplied kbnames parameter. While other knowledge base endpoints safely route through standard path resolution (e.g., resolvekbpath()), the bulk delete handler bypasses this entirely. It builds the path manually and passes it directly to shutil.rmtree() without validating if the resulting path resolves outside the intended user directory.

PoC (Proof of Concept) For the Bulk Delete endpoint, an authenticated attacker can supply a traversal sequence in the kbnames parameter: ../victimuser/kbname

Because the path is passed directly to shutil.rmtree() without containment checks, this payload deletes directories outside the intended scope.

Impact Any Langflow instance exposing this endpoint to authenticated users is vulnerable. This exposes the server to: Cross-user data compromise: Deletion of directories within another tenant's knowledge base space. Arbitrary filesystem manipulation: Directory deletion at any path on the server where the application has write permissions. Service disruption & Data Loss: Deletion of critical application files or unrecoverable data loss if backups are co-located on the same filesystem.

Fixes The issue was addressed in PR #12243, which applies Path.resolve() to normalize the supplied path and validates that it starts with the authenticated user's directory before deletion. Subsequent updates (backported from PR #12337) introduced robust containment checks using Path.isrelativeto() to prevent prefix-ambiguity bugs.

Acknowledgements Thanks to the security researchers who responsibly disclosed this vulnerability: @ddlxstudio @nekros1xx

1 / 2
Source: OSV
First published (updated )
Severity
8.1
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

An authenticated flow author could write attacker-controlled file content into any directory writable by the service account, bypassing the platform's local file access isolation safeguard. Via a crafted on-disk index, the attacker could also read the contents of arbitrary files accessible to the service process — including configuration files, secrets, or database files stored under the application's data directory.

1 / 2
Source: IBM
First published (updated )
Severity
9.8
EPSS
79.41%
Code Injection
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-rvqx-wpfh-mfx7. This link is maintained to preserve external references.

Original Description

Langflow versions prior to 1.3.0 are susceptible to code injection in the /api/v1/validate/code endpoint. A remote and unauthenticated attacker can send crafted HTTP requests to execute arbitrary code.

1 / 4
Source: GitHub
First published (updated )
Severity
9.8
Code Injection
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Langflow versions prior to 1.3.0 are susceptible to code injection in the /api/v1/validate/code endpoint. A remote and unauthenticated attacker can send crafted HTTP requests to execute arbitrary code.

First published (updated )
Severity
6.5
SSRF
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

IBM Langflow OSS 1.0.0 through 1.11.5 is vulnerable to server-side request forgery (SSRF). This may allow an unauthenticated attacker to send unauthorized requests from the system, potentially leading to network enumeration or facilitating other attacks.

1 / 2
Source: MITRE

Remedy

IBM strongly recommends addressing the vulnerability now by upgrading Langflow OSS to version 1.11.6
First published (updated )
Severity
5.4
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

IBM Langflow OSS 1.0.0 through 1.10.2 could allow a remote authenticated attacker to change the password of an account due to improper authentication.

1 / 2
Source: MITRE
First published (updated )
Severity
5.4
SSRF
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

IBM Langflow OSS 1.0.0 through 1.11.2 is vulnerable to server-side request forgery (SSRF). This may allow an authenticated attacker to send unauthorized requests from the system, potentially leading to network enumeration or facilitating other attacks.

First published (updated )
Severity
4.2
AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N

IBM Langflow OSS 1.0.0 through 1.11.5 could allow an authenticated attacker to access another user's MCP server context due to improper cache key isolation in the MCP Tools component.

1 / 2
Source: MITRE

Remedy

IBM strongly recommends addressing the vulnerability now by upgrading Langflow OSS to version 1.11.6 https://pypi.org/project/langflow/
First published (updated )
Severity
6.5
SSRF
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

IBM Langflow OSS 1.0.0 through 1.10.2 is vulnerable to server-side request forgery (SSRF). This may allow an unauthenticated attacker to send unauthorized requests from the system, potentially leading to network enumeration or facilitating other attacks.

1 / 2
Source: MITRE
First published (updated )
Severity
9.6
SSRF
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

IBM Langflow OSS 1.0.0 through 1.10.0 can allow attackers to execute arbitrary Python code with root privileges (UID=0) on the Langflow server by submitting components containing socket or urllib imports. This enables: (1) AWS credential theft via IMDSv1 SSRF with full IAM role permissions, (2) arbitrary file exfiltration from the container filesystem, and (3) lateral movement to internal services (PostgreSQL, Redis) within the Docker network. The scanner incorrectly returns "validated": true, providing a false security signal.

1 / 2
Source: MITRE
First published (updated )
Severity
8.3
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

IBM Langflow OSS 1.0.0 through 1.12.4 contains three message endpoints that perform no ownership verification. Any authenticated user can bulk-delete another user's messages, overwrite message content to inject malicious prompts, or hijack an entire conversation session by reassigning its session ID.

1 / 2
Source: MITRE
First published (updated )
Severity
7.7
SSRF
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

IBM Langflow OSS 1.0.0 through 1.12.3 could allow a remote authenticated attacker to obtain sensitive information due to a server-side request forgery vulnerability.

1 / 2
Source: MITRE
First published (updated )
Severity
6.5
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

IBM Langflow OSS 1.0.0 through 1.12.8 could allow a remote authenticated attacker to obtain sensitive information due to insufficiently protected credentials.

1 / 2
Source: MITRE
First published (updated )
Severity
7.5
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

IBM Langflow OSS 1.0.0 through 1.12.4 could allow a remote attacker to obtain sensitive information due to improper authentication.

1 / 2
Source: MITRE
First published (updated )
Severity
6.5
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

IBM Langflow OSS 1.0.0 through 1.12.4 could allow a remote authenticated attacker to obtain sensitive information due to cleartext storage of sensitive information.

1 / 2
Source: MITRE
First published (updated )
Severity
8.7
EPSS
0.08%
AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Vulnerability

IDOR in GET/PATCH/DELETE /api/v1/flow/{flowid}

The readflow helper in src/backend/base/langflow/api/v1/flows.py branched on the AUTOLOGIN setting to decide whether to filter by userid. When AUTOLOGIN was False (i.e., authentication was enabled), neither branch enforced an ownership check — the query returned any flow matching the given UUID regardless of who owned it.

This exposed any authenticated user to:

- Read any other user's flow, including embedded plaintext API keys - Modify the logic of another user's AI agents - Delete flows belonging to other users

The vulnerability was introduced by the conditional logic that was meant to accommodate public/example flows (those with userid = NULL) under auto-login mode, but inadvertently left the authenticated path without an ownership filter.

---

Fix (PR #8956)

The fix removes the AUTOLOGIN conditional entirely and unconditionally scopes the query to the requesting user:

diff - authsettings = settingsservice.authsettings - stmt = select(Flow).where(Flow.id == flowid) - if authsettings.AUTOLOGIN: - stmt = stmt.where( - (Flow.userid == userid) | (Flow.userid == None) # noqa: E711 - ) + stmt = select(Flow).where(Flow.id == flowid).where(Flow.userid == userid)

All three operations — read, update, and delete — route through readflow, so the single change covers the full attack surface. A cross-user isolation test (testreadflowsuserisolation) was added to prevent regression.

---

Acknowledgements

Langflow thanks the security researcher who responsibly disclosed this vulnerability:

- @chximn-dt

1 / 2
Source: GitHub
First published (updated )
Severity
8.7
AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.5.1, the readflow helper in src/backend/base/langflow/api/v1/flows.py branched on the AUTOLOGIN setting to decide whether to filter by userid. When AUTOLOGIN was False (i.e., authentication was enabled), neither branch enforced an ownership check — the query returned any flow matching the given UUID regardless of who owned it. This allowed any authenticated user to read any other user's flow, including embedded plaintext API keys; modify the logic of another user's AI agents, and/or delete flows belonging to other users. The vulnerability was introduced by the conditional logic that was meant to accommodate public/example flows (those with userid = NULL) under auto-login mode, but inadvertently left the authenticated path without an ownership filter. The fix in version 1.5.1 removes the AUTOLOGIN conditional entirely and unconditionally scopes the query to the requesting user.

First published (updated )
Severity
8.7
AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.5.1, the readflow helper in src/backend/base/langflow/api/v1/flows.py branched on the AUTOLOGIN setting to decide whether to filter by userid. When AUTOLOGIN was False (i.e., authentication was enabled), neither branch enforced an ownership check — the query returned any flow matching the given UUID regardless of who owned it. This allowed any authenticated user to read any other user's flow, including embedded plaintext API keys; modify the logic of another user's AI agents, and/or delete flows belonging to other users. The vulnerability was introduced by the conditional logic that was meant to accommodate public/example flows (those with userid = NULL) under auto-login mode, but inadvertently left the authenticated path without an ownership filter. The fix in version 1.5.1 removes the AUTOLOGIN conditional entirely and unconditionally scopes the query to the requesting user.

First published (updated )
Severity
5.4
SSRF
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

IBM Langflow OSS 1.0.0 through 1.12.3 is vulnerable to server-side request forgery (SSRF). This may allow an authenticated attacker to send unauthorized requests from the system, potentially leading to network enumeration or facilitating other attacks.

1 / 2
Source: MITRE
First published (updated )
Severity
6.5
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

IBM Langflow OSS 1.0.0 through 1.12.3 could allow a remote authenticated attacker to overwrite arbitrary files due to improper limitation of a pathname to a restricted directory.

1 / 2
Source: MITRE
First published (updated )
Severity
4.3
OS Command Injection
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

IBM Langflow OSS 1.0.0 through 1.12.3 could allow a remote authenticated attacker to cause a denial of service due to improper neutralization of special elements used in an OS command.

1 / 2
Source: MITRE
First published (updated )
Severity
4.3
SSRF
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

IBM Langflow OSS 1.0.0 through 1.12.3 is vulnerable to server-side request forgery (SSRF). This may allow an authenticated attacker to send unauthorized requests from the system, potentially leading to network enumeration or facilitating other attacks.

1 / 2
Source: MITRE
First published (updated )
Severity
6.8
Path Traversal
AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N

IBM Langflow OSS 1.0.0 through 1.12.3 could allow an authenticated attacker to produce a server-generated ZIP archive containing entry paths that traverse outside the intended extraction directory. Extraction of the archive by a victim using a non-sanitizing tool could result in arbitrary file write on the victim's host.

1 / 2
Source: MITRE
First published (updated )
Severity
8.8
EPSS
0.45%
Input Validation, Code Injection
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

IBM Langflow OSS 1.0.0 through 1.12.2 could allow a remote authenticated attacker to execute arbitrary code due to improper neutralization of special elements used in an OS command ('Code Injection') related to improper input validation.

1 / 2
Source: MITRE
First published (updated )
Severity
8.8
EPSS
0.55%
Code Injection
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

IBM Langflow OSS 1.0.0 through 1.12.2 could allow a remote authenticated attacker to execute arbitrary code due to improper neutralization of special elements used in code, resulting in a sandbox escape.

1 / 2
Source: MITRE
First published (updated )
Severity
4.3
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

IBM Langflow OSS 1.0.0 through 1.12.2 could allow a remote authenticated attacker to cause a denial of service due to uncontrolled resource consumption during ZIP file extraction.

1 / 2
Source: MITRE
First published (updated )
Severity
9.8
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

IBM Langflow OSS 1.0.0 through 1.12.2 could allow a remote attacker to execute arbitrary code due to an expected dependency confusion.

1 / 2
Source: MITRE
First published (updated )
Severity
8.8
EPSS
0.55%
Code Injection
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

IBM Langflow OSS 1.0.0 through 1.12.2 could allow a remote attacker to execute arbitrary code due to an incomplete blocklist in the code security scanner.

1 / 2
Source: MITRE
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203