🇰🇷 한글 설명
AsyncSSH 2.23.0 미만 버전에서 발생하는 취약점으로, 서버 설정 재로드 시 AuthorizedKeysFile의 %u 토큰을 처리하는 과정에서 경로 탐색(Path Traversal)이 가능합니다. 공격자가 SSH 사용자 이름에 '/', '\', '..'와 같은 경로 조작 문자를 포함할 경우, 의도하지 않은 디렉터리의 키 파일을 읽어 인증을 우회할 수 있습니다.
💡 쉬운 설명
사용자 이름에 특수 문자를 넣어 서버가 엉뚱한 곳에 있는 열쇠 파일을 읽게 만드는 보안 구멍입니다. 이를 통해 공격자는 허가되지 않은 파일로 로그인을 시도할 수 있습니다.
🇺🇸 원문 (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.0, AsyncSSH expands the OpenSSH-compatible AuthorizedKeysFile %u token in asyncssh/config.py, asyncssh/connection.py, asyncssh/auth_keys.py, and asyncssh/misc.py with the raw SSH username during pre-authentication server config reload, allowing a server configured with AuthorizedKeysFile authorized_keys/%u to read an authorized-keys file outside the intended directory when the SSH username contains /, \, or .. path traversal segments and authenticate with an attacker-selected key file. This issue is fixed in version 2.23.0.
📍 영향받는 시스템
AsyncSSH versions prior to 2.23.0
⚔️ 공격 벡터
SSH 사용자 이름에 경로 탐색 문자(/, \, ..)를 포함하여 인증 키 파일의 경로를 조작하는 방식
🛡️ 대응 방법
AsyncSSH를 2.23.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.23.0 미만이면 취약한 상태입니다.
pip show asyncssh | grep Version