CVE-2026-33873·Python vulnerability
Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.9.0, the Agentic Assistant feature in Langflow executes LLM-generated Python code during its validation phase. Although this phase appears intended to validate generated component code, the implementation reaches dynamic execution sinks and instantiates the generated class server-side. In deployments where an attacker can access the Agentic Assistant feature and influence the model output, this can result in arbitrary server-side Python execution. Version 1.9.0 fixes the issue.
- Severity
- critical
- Software
- Python
- Fixed in
- 1.9.0
- Published
- 2026-03-27
Affected versions
Until: 1.9.0
Fixed in: 1.9.0
How to fix this CVE
Upgrade Langflow to version 1.9.0 or later to disable unsafe dynamic code execution in the Agentic Assistant validation pipeline. Organizations running earlier versions should immediately restrict access to the Agentic Assistant feature until patching is complete, as the vulnerability allows authenticated attackers to execute arbitrary Python code on the server.
sudo dnf upgrade langflowDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST /api/v1/agentic/assistant/validate.*(?:import\s+(?:os|subprocess|sys|__import__|eval|exec)|open\(|system\(|popen\(|call\()WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block POST requests to `/api/v1/agentic/assistant/validate` endpoint if the request body contains Python code patterns (keywords: import, exec, eval, open, subprocess, os.system). Alternatively, restrict access to `/api/v1/agentic/*` routes to authenticated users only and implement request body size limits (< 10KB) until patching.How to check if you are affected
- Run `pip show langflow | grep Version` to check the installed Langflow version and confirm it is below 1.9.0.
- Verify if the Agentic Assistant API endpoint is accessible by checking `/api/v1/agentic/*` routes in your Langflow deployment configuration.
- Search application logs for POST requests to `/api/v1/agentic/assistant/validate` containing Python code payloads, particularly those with imports (os, subprocess, sys) or file operations.
- After upgrading to 1.9.0+, confirm the deployment by running `pip show langflow | grep Version` and verify no validation endpoints execute user-supplied code via code inspection tools.
FAQ
What is CVE-2026-33873?
CVE-2026-33873 is a critical remote code execution vulnerability in Langflow's Agentic Assistant feature that improperly executes LLM-generated Python code during component validation, allowing authenticated users to run arbitrary commands on the server.
Is CVE-2026-33873 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, though the attack surface depends on network exposure of the Agentic Assistant feature.
What versions of Langflow are affected by CVE-2026-33873?
All versions of Langflow prior to 1.9.0 are vulnerable. The vulnerability was introduced in the Agentic Assistant feature and is fixed only in version 1.9.0 and later.
How do I check if my server is vulnerable to CVE-2026-33873?
Run `pip show langflow` and check the Version field; if it shows any version before 1.9.0, your installation is vulnerable. Additionally, verify access to Agentic Assistant API endpoints by testing connectivity to `https://<your-langflow-host>/api/v1/agentic/`.
Does Defensia detect CVE-2026-33873?
Yes — Defensia's CVE advisory scanner compares installed Langflow package versions against the NVD database. If Langflow is installed on a monitored server and running a version before 1.9.0, CVE-2026-33873 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/langflow-ai/langflow/blob/f7f4d1e70ba5eecd18162ec96f3571c2cfbcd1fc/src/backend/base/langflow/agentic/api/router.py#L252-L297
- https://github.com/langflow-ai/langflow/blob/f7f4d1e70ba5eecd18162ec96f3571c2cfbcd1fc/src/backend/base/langflow/agentic/api/schemas.py#L20-L31
- https://github.com/langflow-ai/langflow/blob/f7f4d1e70ba5eecd18162ec96f3571c2cfbcd1fc/src/backend/base/langflow/agentic/helpers/code_extraction.py#L11-L53
- https://github.com/langflow-ai/langflow/blob/f7f4d1e70ba5eecd18162ec96f3571c2cfbcd1fc/src/backend/base/langflow/agentic/helpers/validation.py#L27-L47
- https://github.com/langflow-ai/langflow/blob/f7f4d1e70ba5eecd18162ec96f3571c2cfbcd1fc/src/backend/base/langflow/agentic/services/assistant_service.py#L142-L156
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-33873. Free for 1 server.
Get started free