🇰🇷 한글 설명
Glances는 오픈소스 크로스플랫폼 시스템 모니터링 도구입니다. 4.0.8부터 4.5.5 이전 버전까지 glances/secure.py의 secure_popen() 함수가 명령 문자열의 리다이렉션(>), 파이프(|), 명령 체이닝(&&) 연산자를 검증 없이 해석합니다. AMP 모듈이 glances.conf에서 읽은 command 또는 service_cmd 값이 이 함수에 무검증으로 전달되므로, 설정 파일을 수정할 수 있는 공격자가 임의 파일 쓰기, 임의 명령 실행, 명령 출력 파이프 전달이 가능합니다. 4.5.5에서 수정되었습니다.
💡 쉬운 설명
모니터링 도구의 설정 파일에 악성 명령을 넣으면 프로그램이 그 명령을 그대로 실행합니다. 설정 파일에 접근할 수 있는 공격자는 서버에서 원하는 명령을 실행하거나 파일을 조작할 수 있습니다.
🇺🇸 원문 (English)
Glances is an open-source system cross-platform monitoring tool. From 4.0.8 until 4.5.5, the secure_popen() function in glances/secure.py interprets > (file redirection), | (pipe), and && (command chaining) operators in command strings. These operators are applied without any validation on the target file path, piped command, or chained command. When Application Monitoring Process (AMP) modules load their command or service_cmd configuration values from glances.conf, those values are passed directly to secure_popen() with no sanitization. This allows an attacker who can modify the Glances configuration file to write arbitrary content to arbitrary filesystem paths (via >), chain arbitrary commands (via &&), or pipe command output to arbitrary programs (via |). This vulnerability is fixed in 4.5.5.
📍 영향받는 시스템
Glances 4.0.8 이상 4.5.5 미만 버전 (AMP 모듈 사용 환경)
⚔️ 공격 벡터
glances.conf의 AMP command/service_cmd 값에 리다이렉션, 파이프, && 연산자를 포함한 악성 명령을 삽입하여 임의 파일 쓰기 및 명령 실행
🛡️ 대응 방법
Glances를 4.5.5 이상으로 업그레이드하고, glances.conf 파일의 권한을 관리자만 쓰기 가능하도록 제한
🔧 검증 코드
출력된 Version 값이 4.5.5 미만이면 취약하므로 업그레이드가 필요하고, 4.5.5 이상이면 패치가 적용된 상태입니다.
pip show glances 2>/dev/null | grep -i '^version'
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
Windows iSCSI Target Service