CVE-2026-13435
Improper input validation in Langflow's PythonREPL allows sandbox escape.
- CVSS 9.9
- 94
- Input Validation and Sanitization
- Remote
IBM Langflow OSS 1.0.0 through 1.10.1 contains an improper input validation vulnerability in the PythonREPL sandbox implementation.
- CWE
- 94
- CVSS base score
- 9.9
- Published
- 2026-07-30
- 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
- IBM Langflow
- Fixed by upgrading
- Yes
Solution
Upgrade to IBM Langflow OSS version 1.10.2.
Vulnerable code sample
import io
import sys
class PythonREPL:
def __init__(self, globals=None, locals=None):
self.globals = globals if globals is not None else {}
self.locals = locals if locals is not None else {}
def run(self, command: str) -> str:
if "__" in command:
return "Error: blacklisted token '__' in command."
old_stdout = sys.stdout
sys.stdout = captured_output = io.StringIO()
try:
# VULNERABLE: substring blacklist is not a sandbox; exec runs attacker code
exec(command, self.globals, self.locals)
output = captured_output.getvalue()
except Exception as e:
output = str(e)
finally:
sys.stdout = old_stdout
return outputPatched code sample
import ast
import io
import sys
class PythonREPL:
def __init__(self, globals=None, locals=None):
self.globals = globals if globals is not None else {}
self.locals = locals if locals is not None else {}
def run(self, command: str) -> str:
old_stdout = sys.stdout
sys.stdout = captured_output = io.StringIO()
try:
# FIX: evaluate literals only; no exec/eval path remains for the input
output = repr(ast.literal_eval(command))
except (ValueError, SyntaxError, MemoryError, RecursionError) as e:
output = f"Error: only literal expressions are allowed ({e})"
finally:
sys.stdout = old_stdout
return outputPayload
__import__('os').system('id')
Cite this entry
@misc{vaitp:cve202613435,
title = {{Improper input validation in Langflow's PythonREPL allows sandbox escape.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-13435},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-13435/}}
}
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 ::
