🇰🇷 한글 설명
Prefect 3.6.23 버전의 GitRepository 저장 클래스에서 사용자 입력값 검증 미흡으로 인해 원격 코드 실행(RCE) 취약점이 발생합니다. commit_sha 및 directories 파라미터에 git 플래그를 주입하여 외부 프로그램을 실행할 수 있으며, 이를 통해 워커 머신에 임의의 명령을 실행할 수 있습니다.
💡 쉬운 설명
프로그램이 사용자가 입력한 값을 제대로 확인하지 않아, 해커가 악성 명령어를 몰래 끼워 넣을 수 있는 상태입니다. 이를 통해 해커는 서버를 마음대로 조종하거나 중요한 정보를 훔칠 수 있습니다.
🇺🇸 원문 (English)
Prefect version 3.6.23 is vulnerable to remote code execution due to improper handling of user-controlled input in the `GitRepository` storage class. The `commit_sha` parameter, which is passed to git commands, lacks validation and does not include a `--` separator to distinguish user input from git flags. This allows attackers to inject arbitrary git flags, such as `--upload-pack`, enabling execution of external programs. Additionally, the `directories` parameter can be exploited to inject git flags during sparse-checkout operations. These vulnerabilities allow any user with deployment creation permissions to execute arbitrary commands on worker machines, compromising shared work pools in multi-tenant environments.
📍 영향받는 시스템
Prefect version 3.6.23
⚔️ 공격 벡터
배포 권한을 가진 사용자가 Git 관련 파라미터에 악성 플래그를 주입하여 원격 명령 실행
🛡️ 대응 방법
Prefect를 최신 보안 패치가 적용된 버전으로 업데이트하고 입력값 검증 로직을 강화하십시오.
🔧 검증 코드
출력된 버전이 3.6.23과 일치하는지 확인하여 취약 여부를 판단합니다.
pip show prefect | grep -E 'Version'