🇰🇷 한글 설명
Langflow eval_custom_component_code Eval Injection 원격 코드 실행 취약점. 이 취약점은 Langflow의 설치에서 원격 공격자가 임의의 코드를 실행할 수 있도록 허용합니다. 이 취약점을 악용하기 위해 인증은 필요하지 않습니다.
💡 쉬운 설명
Langflow의 eval_custom_component_code 함수에서 사용자 입력을 제대로 검사하지 않아 원격 공격자가 임의의 코드를 실행할 수 있습니다. 이는 공격자가 현재 프로세스에서 코드를 실행하도록 허용합니다.
🇺🇸 원문 (English)
Langflow eval_custom_component_code Eval Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Authentication is not required to exploit this vulnerability.
The specific flaw exists within the implementation of eval_custom_component_code function. The issue results from the lack of proper validation of a user-supplied string before using it to execute python code. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-26972.
🛡️ 대응 방법
Langflow의 최신 버전으로 업데이트하고, eval_custom_component_code 함수의 입력을 검사하는 기능을 강화합니다.
🔧 검증 코드
로컬 시스템에서 Python을 실행하고, pip를 통해 Langflow가 설치되어 있는지 확인합니다. Langflow가 설치되어 있으면 취약, 그렇지 않으면 양호로 판단합니다.
import subprocess
result = subprocess.run(['pip', 'show', 'langflow'], capture_output=True, text=True)
if 'Langflow' in result.stdout:
print({"result": "취약", "reason": "Langflow가 설치되어 있습니다."})
else:
print({"result": "양호", "reason": "Langflow가 설치되어 있지 않습니다."})