🇰🇷 한글 설명
Bash-it 3.2.0의 barbuk 테마 내 Python 가상환경 프롬프트 세그먼트에서 터미널 이스케이프 시퀀스 주입 취약점이 발견되었습니다. 공격자가 조작된 pyproject.toml 파일의 requires-python 필드에 이스케이프 시퀀스를 삽입하면, 사용자가 해당 디렉토리에 진입할 때 필터링되지 않은 값이 PS1 프롬프트에 직접 결합되어 터미널 제어 시퀀스가 실행될 수 있습니다.
💡 쉬운 설명
악성 코드가 담긴 설정 파일이 있는 폴더에 들어가기만 해도, 터미널 화면이 이상하게 변하거나 공격자가 의도한 명령이 실행될 수 있는 보안 약점입니다. 설정 파일에 숨겨진 특수 문자가 터미널 프로그램에 잘못 전달되어 발생합니다.
🇺🇸 원문 (English)
Bash-it 3.2.0 contains a terminal escape sequence injection vulnerability in the barbuk theme's Python virtualenv prompt segment that allows local attackers to inject arbitrary terminal control sequences by embedding escape sequences in the requires-python field of a pyproject.toml file. When a user navigates into a directory containing a maliciously crafted pyproject.toml, the unfiltered field value is read via awk and concatenated directly into PS1 through __prompt-command without stripping control characters, causing injected OSC or CSI sequences to be written to and interpreted by the terminal emulator on every prompt render.
📍 영향받는 시스템
Bash-it version 3.2.0 (barbuk theme 사용 시)
⚔️ 공격 벡터
조작된 pyproject.toml 파일이 포함된 디렉토리로 사용자가 이동하여 프롬프트가 렌더링될 때 발생
🛡️ 대응 방법
Bash-it를 최신 버전으로 업데이트하거나, barbuk 테마 대신 다른 테마를 사용하십시오.
🔧 검증 코드
출력된 커밋 해시를 통해 현재 설치된 Bash-it의 버전을 확인하여 취약한 버전인지 판별합니다.
git -C ~/.bash_it rev-parse HEAD