PyPI: langflow

CVE-2026-33873

Safety vulnerability ID: SFTY-20260326-09795

Safety legacy ID: pyup.io-90736

Affected versions of the langflow package are vulnerable to Code Injection due to unsafe dynamic execution of LLM-generated Python code during Agentic Assistant validation. The /assist validation flow reaches execute_flow_with_validation(), execute_flow_file(), extract_component_code(), and validate_component_code(), which ultimately call create_class() in lfx.custom.validate, where the generated code is executed with exec(...) and the resulting class is instantiated server-side instead of being treated as untrusted text.

Created at: Apr 14, 2026Updated at: Apr 14, 2026

Overview

Langflow has Authenticated Code Execution in Agentic Assistant Validation

Advisory

Affected versions of the langflow package are vulnerable to Code Injection due to unsafe dynamic execution of LLM-generated Python code during Agentic Assistant validation. The /assist validation flow reaches execute_flow_with_validation(), execute_flow_file(), extract_component_code(), and validate_component_code(), which ultimately call create_class() in lfx.custom.validate, where the generated code is executed with exec(...) and the resulting class is instantiated server-side instead of being treated as untrusted text.

Affected Package

Affecting langflow package, versions
<1.9.0

Also affects

---

How to Fix

Upgrade
langflow
to
1.9.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

References

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more