🇰🇷 한글 설명
Pheditor 2.0.1부터 2.0.6 미만 버전의 터미널 기능에서 불완전한 문자 차단 목록으로 인해 발생하는 취약점입니다. 인증된 사용자가 파이프(|), 백틱(`), 줄바꿈(0x0A) 문자를 사용하여 허용된 명령 목록을 우회하고 임의의 OS 명령을 실행할 수 있습니다.
💡 쉬운 설명
파일 관리 프로그램의 터미널 기능에서 보안 검사가 제대로 이루어지지 않아 발생하는 문제입니다. 권한이 있는 사용자가 특수 문자를 이용해 프로그램이 허용하지 않은 위험한 명령어를 몰래 실행할 수 있습니다.
🇺🇸 원문 (English)
Pheditor is a single-file editor and file manager written in PHP. From version 2.0.1 to before version 2.0.6, the terminal feature in Pheditor uses an incomplete character blocklist to sanitize user-supplied commands before passing them to shell_exec(). After the fix for GHSA-9643-6xjp-vx57 (which added $ to the blocklist), the characters | (single pipe), ` (backtick), and the newline byte (0x0A) remain unblocked. An authenticated user with the terminal permission (enabled by default) can leverage any of these to bypass the TERMINAL_COMMANDS allowlist and execute arbitrary OS commands as the web server user. This issue has been patched in version 2.0.6.
📍 영향받는 시스템
Pheditor version 2.0.1 to < 2.0.6
⚔️ 공격 벡터
인증된 사용자가 터미널 입력창에 파이프(|), 백틱(`), 또는 줄바꿈 문자를 포함한 명령어를 입력하여 명령 실행 우회
🛡️ 대응 방법
Pheditor를 최신 보안 패치가 적용된 버전 2.0.6 이상으로 업데이트하십시오.
🔧 검증 코드
출력 결과에 2.0.1에서 2.0.5 사이의 버전 번호가 나타나면 취약한 상태입니다.
php -r 'echo "Pheditor version check";' | grep -E '2.0.[1-5]'