🇰🇷 한글 설명
langflow v1.9.3 버전에서 인증된 공격자가 임의의 파이썬 코드를 실행할 수 있는 코드 주입 취약점이 발견되었습니다. /api/v1/validate/code 엔드포인트가 사용자로부터 입력받은 코드를 샌드박싱 없이 직접 실행하기 때문에 발생합니다.
💡 쉬운 설명
해커가 인증된 사용자로 로그인한 뒤, 서버에 몰래 악성 명령어를 보내 컴퓨터를 마음대로 조종할 수 있는 문제입니다. 입력한 코드가 검증 없이 바로 실행되기 때문에 매우 위험합니다.
🇺🇸 원문 (English)
langflow-ai langflow v1.9.3 is affected by: Code Injection. The impact is: execute arbitrary code (remote). The component is: src/backend/base/langflow/api/v1/validate.py:validate-post_validate_code-a-real-authenticated-http-post-to-api-v1. The attack vector is: Attack surface: HTTP or browser-backed service path. A public-facing route accepts raw Python source and forwards it into a server-side compile/exec validation path without any visible entitlement guard. ¶¶ A weakness has been identified in langflow-ai langflow up to 1.9.3. langflow contains a code injection vulnerability in validate-post_validate_code-a-real-authenticated-http-post-to-api-v1 (src/backend/base/langflow/api/v1/validate.py:13). An authenticated attacker can execute arbitrary Python code on the server by submitting malicious code to the /api/v1/validate/code endpoint, which directly executes user-supplied code without sandboxing or security controls.
📍 영향받는 시스템
langflow v1.9.3 및 그 이하 버전
⚔️ 공격 벡터
인증된 공격자가 HTTP POST 요청을 통해 /api/v1/validate/code 엔드포인트로 악성 파이썬 코드를 전송
🛡️ 대응 방법
해당 취약점이 해결된 최신 버전으로 업데이트하거나, 코드 실행 엔드포인트에 대한 접근 제어 및 샌드박싱 환경을 구축해야 합니다.
🔧 검증 코드
출력된 버전이 1.9.3 이하인지 확인하여 취약 여부를 판단합니다.
pip show langflow | grep Version