CVE-2024-42835:
langflow has vulnerability in PythonCodeTool component
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.80539%
CWE
-
Published
10/31/2024
Updated
11/1/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
langflow | pip | <= 1.0.12 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the PythonCodeTool's build method directly executing user-controlled code via exec()
in the global namespace. The GitHub issue reproduction demonstrates how passing malicious code in tool_code
(like os.popen
calls) gets executed server-side. The lack of input validation, restricted namespaces, or sandboxing around the exec()
call makes this a clear RCE vector. The code structure shown in the issue matches typical Python tool execution patterns in LangChain
-based frameworks.