VAITP Dataset

← Back to the dataset

CVE-2026-14499

Langflow allows authenticated command execution with elevated privileges.

  • CVSS 8.8
  • CWE-78
  • Input Validation and Sanitization
  • Remote

IBM Langflow OSS 1.0.0 through 1.10.1 Langflow could allow an authenticated user to execute arbitrary commands with elevated privileges on the system due to improper validation of user supplied input in the Python Interpreter component.

CVSS base score
8.8
Published
2026-07-17
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
Python Inter
Fixed by upgrading
Yes

Solution

Upgrade to IBM Langflow OSS 1.10.2.

Vulnerable code sample

def vulnerable_python_interpreter_component(user_code: str):
    # In the vulnerable version, user-supplied code is executed without
    # any sandboxing or validation.
    exec(user_code)

# Malicious payload provided by an authenticated user.
# This payload uses a built-in function to import the 'os' module
# and then executes an arbitrary system command.
malicious_input = "__import__('os').system('echo VULNERABLE: Code execution successful. UID=$(id -u)')"

# The application backend calls the vulnerable component with the user's input.
vulnerable_python_interpreter_component(malicious_input)

Patched code sample

import sys
from io import StringIO

def execute_safely(user_code: str):
    """
    Executes user-provided Python code in a restricted environment
    to prevent arbitrary command execution. This represents a fix for
    a vulnerability where user input was passed to exec() without validation.
    """
    # A whitelist of safe built-in functions.
    # Crucially, this excludes dangerous functions like 'open', 'eval', 'exec',
    # and '__import__', which could be used for system access.
    SAFE_BUILTINS = {
        'abs', 'all', 'any', 'bin', 'bool', 'dict', 'float', 'int', 'isinstance',
        'len', 'list', 'max', 'min', 'pow', 'range', 'repr', 'round', 'set',
        'sorted', 'str', 'sum', 'tuple', 'type', 'print'
    }

    # Create a dictionary of the allowed built-ins.
    safe_builtins_dict = {
        name: __builtins__[name] for name in SAFE_BUILTINS if hasattr(__builtins__, name)
    }

    # The 'globals' dictionary for the exec() context is carefully constructed.
    # It contains only our whitelisted built-ins and nothing from the
    # surrounding code's scope.
    safe_globals = {"__builtins__": safe_builtins_dict}

    # Redirect stdout to a string buffer to capture any output from the code.
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()

    try:
        # Execute the user's code. The second argument defines the global scope,
        # and the third defines the local scope. By providing our 'safe_globals'
        # and an empty local scope, we severely limit what the code can do.
        # An attempt to use a disallowed function (e.g., open()) will now
        # raise a NameError because it does not exist in the provided scope.
        exec(user_code, safe_globals, {})

        # Get the captured output.
        output = redirected_output.getvalue()
    except Exception as e:
        # If any error occurs during execution, capture it as a string.
        output = f"Error: {type(e).__name__}: {e}"
    finally:
        # Always restore the original stdout.
        sys.stdout = old_stdout

    return output

Payload

import os; os.system('id')

Cite this entry

@misc{vaitp:cve202614499,
  title        = {{Langflow allows authenticated command execution with elevated privileges.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-14499},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-14499/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::