🇰🇷 한글 설명
AsyncSSH의 SSHServerConfig._set_tokens 함수에서 경로 탐색 방지 로직이 불완전하여 발생하는 취약점입니다. 특정 문자열을 차단하지만 선행하는 '~'나 '${ENV}'를 차단하지 못해, AuthorizedKeysFile 경로가 의도된 디렉토리를 벗어나 시스템 파일로 확장될 수 있습니다.
💡 쉬운 설명
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. Version 2.23.0 contains an incomplete fix for CVE-2026-45309 in SSHServerConfig._set_tokens that blocks /, , and .. before %u substitution in AuthorizedKeysFile but does not block a leading ~ or ${ENV}, allowing later expansion in _expand_val and Path(filename).expanduser() to escape the intended authorized-keys directory. This issue is fixed in version 2.23.1.
📍 영향받는 시스템
AsyncSSH version 2.23.0
⚔️ 공격 벡터
AuthorizedKeysFile 설정 시 '~' 또는 '${ENV}'와 같은 환경 변수/홈 디렉토리 확장 문자를 사용하여 경로를 탈출하는 방식
🛡️ 대응 방법
AsyncSSH를 버전 2.23.1 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.23.0인 경우 해당 취약점에 노출된 상태입니다.
pip show asyncssh | grep Version