🇰🇷 한글 설명
Vim의 Python omni-completion 스크립트에서 발생하는 취약점으로, +python3 또는 +python 인터프리터가 활성화된 경우에 영향을 받습니다. 악의적인 .py 파일을 열고 omni-completion을 실행하면 Python의 import 메커니즘을 통해 해당 파일과 같은 디렉토리에 있는 패키지의 최상위 코드가 편집자 권한으로 실행됩니다. 이 문제는 Vim 버전 9.2.0561에서 패치되었습니다.
💡 쉬운 설명
해커가 만든 파이썬 파일을 Vim으로 열고 특정 기능을 실행하기만 해도, 컴퓨터에 몰래 숨겨진 악성 코드가 자동으로 실행될 수 있는 보안 약점입니다. 사용자가 파일을 열어보는 것만으로도 공격자가 사용자의 권한을 탈취할 수 있어 위험합니다.
🇺🇸 원문 (English)
Vim is an open source, command line text editor. Prior to version 9.2.0561, the Python omni-completion script in python3complete.vim for Vim with the +python3 interpreter enabled (and the legacy pythoncomplete.vim for builds with the +python interpreter) executes the import and from statements found in the current buffer through Python's import machinery. Because the buffer's working directory is on sys.path, opening a hostile .py file with a sibling Python package and invoking omni-completion runs that package's top-level code as the editing user. This issue has been patched in version 9.2.0561.
📍 영향받는 시스템
Vim 9.2.0561 미만 버전 (+python3 또는 +python 인터프리터 활성화 시)
⚔️ 공격 벡터
악의적인 파이썬 파일이 포함된 디렉토리에서 해당 파일을 Vim으로 열고 omni-completion 기능을 호출함
🛡️ 대응 방법
Vim을 최신 버전인 9.2.0561 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Vim 버전이 9.2.0561 미만인지 확인하고, Python 인터프리터 지원 여부를 체크합니다.
vim --version | grep -E 'Python|version'