提交 #798731: langflow-ai langflow 1.8.4 Command Injection
| 标题 | langflow-ai langflow 1.8.4 Command Injection |
|---|---|
| 描述 | The `CodeParser.parse_callable_details()` method extracts the annotation string via `ast.unparse()` when parsing function return type annotations and directly passes it to `eval()` for execution. The execution environment (`eval_env`) for `eval()` is constructed by `construct_eval_env()`, but `__builtins__ = {}` is never set. The Python specification stipulates: When the globals dict passed to eval() does not contain the __builtins__ key, the Python interpreter automatically adds the full builtins module. As a result, all built-in functions such as __import__, open, exec, and eval can be used in the eval environment. We can embed malicious expressions (such as __import__('os').popen('cmd').read()) in the return type annotations of functions within custom component code. When the CodeParser processes this code, the eval() function will execute the expression directly. |
| 来源 | ⚠️ https:/ |
| 用户 | limshow (UID 92836) |
| 提交 | 2026-04-07 17時09分 (2 月前) |
| 管理 | 2026-05-02 18時06分 (25 days later) |
| 状态 | 已接受 |
| VulDB条目 | 360857 [langflow-ai langflow 直到 1.8.4 Full Builtins code_parser.py CodeParser.parse_callable_details 权限提升] |
| 积分 | 20 |