🇰🇷 한글 설명
Cahier de texte 2.0의 administration/telecharger.php에서 chemin 매개변수 검증 부재로 인한 디렉토리 트래버설 취약점입니다. 원격 공격자가 이를 악용하여 소스코드를 포함한 파일의 파싱되지 않은 내용을 획득할 수 있습니다. 특히 데이터베이스 연결 설정 파일(conn_cahier_de_texte.php)에서 MySQL 사용자명과 암호 탈취가 가능합니다.
💡 쉬운 설명
웹 관리 파일의 경로 검증 부재로 공격자가 시스템의 민감한 파일에 접근할 수 있습니다. 이를 통해 데이터베이스 암호 같은 핵심 보안 정보가 노출될 수 있습니다.
🇺🇸 원문 (English)
administration/telecharger.php in Cahier de texte 2.0 allows remote attackers to obtain unparsed content (source code) of files via the chemin parameter, as demonstrated using directory traversal sequences to obtain the MySQL username and password from conn_cahier_de_texte.php. NOTE: it is not clear whether the scope of this issue extends above the web document root, and whether directory traversal is the primary vulnerability.
📍 영향받는 시스템
Cahier de texte 2.0 및 해당 버전을 사용하는 PHP 기반 교육 관리 시스템
⚔️ 공격 벡터
administration/telecharger.php의 chemin 매개변수에 디렉토리 트래버설 문자열(../)을 입력하여 웹 루트 외부 파일 접근
🛡️ 대응 방법
chemin 매개변수에 대한 입력 검증 및 whitelist 구현, realpath() 사용으로 절대 경로 확인, web document root 외부 접근 금지
🔧 검증 코드
파일이 발견되면 해당 파일의 버전을 확인하고, conn_cahier_de_texte.php의 소스코드에서 평문 암호 저장 여부 및 chemin 매개변수 검증 로직 부재 여부를 검토합니다.
find /var/www -path '*cahier*' -name '*.php' 2>/dev/null | grep -E '(telecharger|conn_cahier)' | head -5