🇰🇷 한글 설명
Vim 9.2.0736 이전 버전의 PHP omni-completion 스크립트에서 발생하는 취약점입니다. 편집 중인 버퍼의 클래스나 트레이트 이름을 처리할 때 이스케이프 처리가 누락되어, 특수 문자가 포함된 PHP 파일을 열고 자동 완성을 실행하면 임의의 운영체제 명령어가 실행될 수 있습니다.
💡 쉬운 설명
Vim 편집기에서 특정 코드가 작성된 파일을 열고 자동 완성 기능을 사용하면 해커가 심어놓은 악성 명령어가 컴퓨터에서 실행될 수 있습니다. 이는 편집기가 파일 안의 내용을 검증 없이 명령어로 바로 실행하기 때문에 발생합니다.
🇺🇸 원문 (English)
Vim is an open source, command line text editor. Prior to 9.2.0736, the PHP omni-completion script in runtime/autoload/phpcomplete.vim interpolates a class or trait name, taken from the contents of the edited buffer, into a search() pattern that is run via win_execute() without escaping. A name containing a single quote can terminate the search() string argument early, and because the bar is honored as an Ex command separator, the remainder of the name is run as Ex commands; via the :! command this allows arbitrary operating-system command execution when a victim opens a crafted PHP file and invokes omni-completion. This issue is fixed in version 9.2.0736.
📍 영향받는 시스템
Vim 9.2.0736 미만 버전
⚔️ 공격 벡터
조작된 PHP 파일을 열고 omni-completion 기능을 호출하여 Ex 명령어를 통한 원격 코드 실행
🛡️ 대응 방법
Vim을 최신 버전인 9.2.0736 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Vim 버전이 9.2.0736보다 낮은지 확인하십시오.
vim --version | head -n 1 | grep -oE 'Vim (9\.[0-9]+(\.[0-9]+)? )?'