/

CVE-2026-33497

Severity:

HIGH RISK

(7.5)

Path Traversal in Langflow Profile Picture Download Endpoint

CVE-2026-33497

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Sensitive Information Disclosure

Severity:

HIGH RISK

(7.5)

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

A directory traversal issue in Langflow's profile picture download endpoint allows attackers to manipulate folder and file parameters to read files outside the intended image directory.

When exploited, this flaw can expose sensitive application data, including the secret_key, leading to further compromise of the Langflow instance and its users.

Affected context

This vulnerability occurs in Langflow deployments exposing the /profile_pictures/{folder_name}/{file_name} endpoint.

It manifests when user-supplied folder_name and file_name values are used to access files on disk without strict validation or normalization to a fixed base directory.

Any environment where this endpoint is reachable by untrusted users and the application's secret_key or other sensitive files are stored in accessible server-side paths is at risk.

Exploit preconditions

  • Attack surface: HTTP requests to the /profile_pictures/{folder_name}/{file_name} endpoint.
  • Required access: Network access to the Langflow web interface/API (typically unauthenticated or low-privilege user, depending on deployment).
  • Trigger point: Supplying crafted folder_name and/or file_name values containing path traversal sequences (e.g., parent directory references) or absolute/alternative paths.
  • Why exploitation is possible: The server-side implementation combines user-controlled path segments into file system paths without enforcing a strict base directory or adequately sanitizing disallowed characters and traversal patterns, allowing access to files outside the intended profile picture directory.

Why this happens

The core issue is improper restriction of file system paths constructed from user input, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The download_profile_picture function trusts folder_name and file_name parameters and uses them to locate files on disk without robust checks such as canonicalization, enforcement of a fixed root directory, or rejection of traversal sequences.

As a result, attackers can escape the designated profile pictures directory and reach arbitrary readable files, including configuration files containing the application's secret_key.

Potential impact

  • Exposure of the application's secret_key, which can be used to forge tokens, sessions, or other signed data.
  • Disclosure of configuration files, logs, or other sensitive application data.
  • Increased risk of account takeover or privilege escalation through tampering with signed objects.
  • Facilitation of further attacks by revealing environment details, file paths, and credentials.

General mitigation guidance

Effective mitigation focuses on constraining file access to a well-defined directory and treating all path components as untrusted:

  • Resolve requested paths against a fixed, application-controlled base directory and reject any request that resolves outside this directory.
  • Normalize and canonicalize paths before use, and explicitly deny traversal indicators such as .., leading slashes, backslashes, and null bytes.
  • Avoid passing raw user input into file system APIs; instead map user-visible identifiers to server-side file paths via a lookup table or database.
  • Store high-value secrets (such as secret keys) outside web-accessible directories and segregated from user-controlled file trees.
  • Apply defense-in-depth with least-privilege filesystem permissions so that the web process cannot read unnecessary sensitive files.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using:

  • Static analysis rules that flag uses of user-controlled path segments in file operations without normalization or base-directory checks.
  • Code review checklists that call out any endpoint serving files from disk and require explicit path validation and restriction.
  • Runtime logging and monitoring for suspicious access patterns, such as requests containing ../, encoded traversal sequences, or unexpected file extensions.
  • Security testing (including automated DAST and manual penetration testing) focused on all file download or media-serving endpoints.

Sources

SourceLink
github.comgithub.com/langflow-ai/langflow/security/advisories/GHSA-ph9w-r52h-28p7

Frequently asked

questions

Yes. Any attacker who can send HTTP requests to the affected endpoint can attempt path traversal attacks, subject to network access controls around the Langflow instance.

It depends on how the endpoint is deployed and protected. If /profile_pictures/... is publicly accessible or available to low-privilege users, then no special privileges are required beyond basic access to the Langflow interface or API.

The most robust fix is to strictly bind file access to a predefined directory tree: canonicalize the requested path, verify it remains under the allowed root, and reject or normalize any input containing traversal or absolute-path constructs. Avoid directly exposing filesystem paths in user-controllable parameters.

Adopt a secure file-handling pattern across the codebase: treat all path components as untrusted, centralize file access through utility functions that enforce base directory and validation rules, separate secrets and configuration from web-accessible directories, and include path traversal checks in code review and automated scanning policies.

Find out what's already
exploitable in your codebase.