🇰🇷 한글 설명
Langflow Python 함수 코드 주입 원격 코드 실행 취약점. 이 취약점은 Langflow 설치에 임의의 코드를 실행할 수 있도록 허용한다. 공격 벡터와 악용 가능성은 제품 구성에 따라 다르다.
💡 쉬운 설명
Langflow에서 Python 함수를 처리하는 중에 발생하는 취약점으로, 공격자가 임의의 코드를 실행할 수 있다. 이는 공격자가 Langflow 설치에서 코드를 실행하는 것을 허용한다. 공격자는 이 취약점을 악용하여 코드를 실행할 수 있다.
🇺🇸 원문 (English)
Langflow PythonFunction Code Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Attack vectors and exploitability will vary depending on the configuration of the product.
The specific flaw exists within the handling of Python function components. Depending upon product configuration, an attacker may be able to introduce custom Python code into a workflow. An attacker can leverage this vulnerability to execute code in the context of the application. Was ZDI-CAN-27497.
🛡️ 대응 방법
Langflow 업데이트나 패치 적용
🔧 검증 코드
로컬에서 pip를 사용하여 Langflow 패키지 버전을 확인한다. Langflow가 설치되어 있지 않다면 취약점 여부를 확인할 수 없다. 코드를 실행하기 전에 pip를 설치하고, Langflow를 설치한 후에 코드를 실행한다.
import subprocess
result = subprocess.run(['pip', 'show', 'langflow'], capture_output=True, text=True)
if 'Version' in result.stdout and float(result.stdout.split('Version: ')[1].split('\n')[0]) < 1.0:
print('{"result": "취약", "reason": "Langflow 버전이 낮음"}')
else:
print('{"result": "양호", "reason": "Langflow 버전이 최신"}')