🇰🇷 한글 설명
AsyncSSH 2.23.1 미만 버전에서 발생하는 취약점으로, 악의적인 SSH 서버가 SCP 클라이언트의 파일 시스템에 임의의 파일을 작성할 수 있습니다. 이는 _parse_cd_args 함수가 서버가 제공한 파일명을 검증 없이 반환하고, _recv_files 함수가 경로 경계 검사 없이 파일명을 결합하기 때문에 발생합니다.
💡 쉬운 설명
나쁜 서버가 파일을 보낼 때 파일 이름에 '상위 폴더로 이동'하는 특수 기호를 섞어 보내면, 내 컴퓨터의 중요한 시스템 파일을 마음대로 수정하거나 생성할 수 있는 문제입니다. 파일 이름에 포함된 경로 조작 명령을 프로그램이 제대로 걸러내지 못해서 발생합니다.
🇺🇸 원문 (English)
AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework. Prior to 2.23.1, a malicious SSH server can write arbitrary files on the asyncssh SCP client's filesystem by sending filenames containing ../ traversal sequences because _parse_cd_args in scp.py returns server-provided names verbatim and _recv_files joins them to the destination path without enforcing the target directory boundary. This issue is fixed in version 2.23.1.
📍 영향받는 시스템
AsyncSSH 버전 2.23.1 미만
⚔️ 공격 벡터
악의적인 SSH 서버가 경로 탐색(Path Traversal) 시퀀스가 포함된 파일명을 SCP 클라이언트로 전송
🛡️ 대응 방법
AsyncSSH를 최신 버전인 2.23.1 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 2.23.1보다 낮으면 취약한 상태입니다.
pip show asyncssh 2>/dev/null | grep Version