🔍 CVE-2014-5023

6.8
CVSS Score
MEDIUM
2014-07-22
2026-05-06 22:30
✅ 완료

🇰🇷 한글 설명

Gitlist의 Repository.php에 쉘 메타문자 필터링 부재로 인한 명령어 실행 취약점. 커밋 권한을 가진 원격 공격자가 브랜치 이름에 쉘 명령어를 삽입하여 서버에서 임의 명령어를 실행할 수 있습니다.

💡 쉬운 설명

Gitlist는 브랜치 이름을 안전하게 검증하지 않아, 악의적인 브랜치 이름으로 컴퓨터 전체를 제어할 수 있습니다. 커밋 권한이 있는 누군가가 '$(rm -rf /)' 같은 이름의 브랜치를 만들면 실제로 그 명령어가 실행됩니다.

🇺🇸 원문 (English)

Repository.php in Gitter, as used in Gitlist, allows remote attackers with commit privileges to execute arbitrary commands via shell metacharacters in a branch name, as demonstrated by a "git checkout -b" command.

📍 영향받는 시스템

Gitlist (모든 버전), Gitter에 포함된 Repository.php

⚔️ 공격 벡터

커밋 권한이 있는 사용자가 'git checkout -b "`whoami`"' 같은 쉘 메타문자가 포함된 브랜치 이름 생성

🛡️ 대응 방법

Gitlist 업그레이드 또는 Repository.php의 shell_exec() 호출 시 escapeshellcmd() / escapeshellarg() 적용

🔧 검증 코드

결과에서 escapeshell 없이 shell_exec/passthru/system이 있으면 취약점 존재; 없으면 패치됨

Shell / Script
grep -r 'shell_exec\|passthru\|system' /path/to/gitlist --include='*.php' | grep -v escapeshell

📊 CVSS Vector String

CVSS Vector
AV:N/AC:M/Au:N/C:P/I:P/A:P

💻 영향받는 소프트웨어

Git