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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-104883 — CVE-2026-104883 的概念验证与实验环境:一个被委派的 Contao 用户管理器自行授予 theme_import 权限,从而升级为 PHP RCE,并配有漏洞版/修复版的差分测试框架。 | Kitploit
工具/GitHubGitHub/googlesky/cve-2026-104883
权限提升漏洞利用Web应用程序漏洞利用实验室与实践
GitHubgooglesky/cve-2026-104883

CVE-2026-104883

CVE-2026-104883 的概念验证与实验环境:一个被委派的 Contao 用户管理器自行授予 theme_import 权限,从而升级为 PHP RCE,并配有漏洞版/修复版的差分测试框架。

查看仓库
3天前尚未审核
分享

CVE-2026-104883 — Contao:非管理员自我授予隐式管理员能力(权限提升至 RCE)

License: MIT Research status: validated

CVECVE-2026-104883
组件contao/core-bundle — CheckTemplateEditorSaveListener / TemplateEditorModuleVoter(tl_user、tl_user_group)
受影响版本< 5.3.50(以及修复前的 5.7.x 系列)
修复版本5.3.50 — 提交 211498f28(GHSA-r9qp-pqx5-8369)
CWECWE-269(权限管理不当)、CWE-863(授权不正确)
影响被委派的用户/组管理员(该角色明确不被授予模板/代码访问权限)可以自我授予具备 RCE 能力的 theme_import 能力——以及 layout、unfiltered_html 等——从而提升至在服务器上执行任意 PHP 代码
攻击向量已认证的低权限后台用户编辑自己的账户/组
触发条件保存 themes = ['theme_import'](themes 字段没有防护)

5.7.3 的加固仅防护了 modules / tpl_editor:

// vulnerable CheckTemplateEditorSaveListener — registered only on fields.modules.save
if (!\is_array($newModules) || !\in_array('tpl_editor', $newModules, true)) {
    return $value;   // themes/theme_import is never inspected -> grant accepted
}

该修复会防护每一个隐式管理员字段和值:

// fixed CheckImplicitAdminSaveListener (commit 211498f28)
private const IMPLICIT_ADMIN_VALUES = [
    'modules' => ['tpl_editor'],
    'themes' => ['theme_import', 'layout'],
    'elements' => ['unfiltered_html'],
    'frontendModules' => ['unfiltered_html', 'listing'],
    'alexf' => [/* list_table, list_where, unfilteredHtml, ... */],
];
// registered on fields.modules/themes/elements/frontendModules/alexf.save;
// throws AccessDeniedException (ERR.grantAdminOnly) for a non-admin self-grant.

1. 根本原因

提交 2b83a60f7763(5.7.3)通过添加 TemplateEditorModuleVoter 和保存回调加固了模板编辑器,使非管理员无法自行授予 tpl_editor 后端模块(可编辑的、支持 PHP 的模板允许服务器端代码执行)。该保护仅覆盖 modules 字段和字面值 tpl_editor。同样具备 RCE 能力的 theme_import 能力位于另一个字段——themes 复选框字段(tl_user_group.php / tl_user.php)——该字段既没有 save_callback,也没有投票器。TemplateEditorModuleVoter 是唯一为 tl_user_group 注册的 DataContainer 投票器,且不覆盖 themes。因此,被委派的用户管理员可以将 themes 添加到模块字段,并将 theme_import 添加到主题字段(两者均被接受——只有 tpl_editor 被阻止),重新认证,并获得任意 PHP 执行能力。修复方案将监听器重命名为 CheckImplicitAdminSaveListener,将其注册到 modules/themes/elements/frontendModules/alexf,并拒绝非管理员对每个隐式管理员值的自行授予。

2. 复现环境

服务镜像角色
ct-vulncve-2026-104883:vuln真实的 CheckTemplateEditorSaveListener(修复前)
ct-fixedcve-2026-104883:fixed真实的 CheckImplicitAdminSaveListener(厂商修复)
poccve-2026-104883-poc:local仅使用标准库的 Python 驱动程序

一个 PHP 测试框架从每个标签逐字加载真实的上游监听器类,并以非管理员身份(isGranted('ROLE_ADMIN') = false)在给定字段/值上调用 __invoke($value, $dc),且无先前访问权限。Symfony/Contao 依赖被桩替代;监听器逻辑本身未被改动。两侧仅在上游监听器源代码上有所不同。

3. 运行环境

./run-lab.sh build     # builds both sides (php:8.3-cli)
./run-lab.sh up        # cve104883lab network: ct-vuln / ct-fixed
./run-lab.sh sweep
./run-lab.sh down

4. PoC

poc/poc.py(仅使用标准库):

  • check — 当非管理员 themes=['theme_import'] 保存被接受时退出码为 1,被拒绝时为 0;3 表示无 worker,2 表示不可达/不确定。
  • exploit — 叙述式提权:委派用户管理器 → 自我授予 theme_import → 重新认证 → 任意 PHP 执行。
  • probe — 字段/值矩阵:tpl_editor(两者均受防护)、theme_import / layout / unfiltered_html(绕过)、良性模块对照。
  • mitigation — 5.3.50 / 提交 211498f28。

一个独立的完整链路利用程序位于 exploit/exploit.py:

python3 exploit/exploit.py --host=ct-vuln
# exit 1 on confirmed implicit-admin self-grant, 0 on a safe target

5. 预期结果

非管理员保存ct-vuln(修复前)ct-fixed(211498f28)
modules = ['tpl_editor']拒绝(ERR.grantTemplateEditor)拒绝(ERR.grantAdminOnly)
themes = ['theme_import']允许(绕过)拒绝
themes = ['layout']允许拒绝
elements = ['unfiltered_html']允许拒绝
modules = ['news'](良性)允许允许

捕获的运行记录:evidence/check-*-run.txt、evidence/exploit-*-run.txt、 evidence/probe-*-run.txt、evidence/mitigation-*-run.txt、 evidence/exploit-standalone-run.txt、evidence/exploit-standalone-fixed-run.txt、 evidence/versions.txt、evidence/0day-sweep.txt。

6. 环境前提条件

  • Podman(或 Docker);在隔离的 cve104883lab 网络上运行受限容器;实验镜像中使用 PHP 8.3 运行时。
  • 真实环境利用需要在 Contao 安装上拥有一个被委派的用户/组管理器账户 (user 或 group 后端模块);无需管理员 访问权限。

7. 额外发现(针对修复后代码线的 0-day 排查)

修复后的 CheckImplicitAdminSaveListener 会拒绝 modules/themes/elements/frontendModules/alexf 中所有隐式管理员 自我授权(tpl_editor、theme_import、layout、unfiltered_html、listing,以及 alexf 列表字段),针对的是此前没有访问权限的非管理员。良性值仍可 保存。早先仅针对 tpl_editor 的防护使 theme_import / layout / unfiltered_html 保持开放;该修复将所有这些都关闭。不再存在隐式管理员 自我授权路径。

8. 仓库布局

README.md             this write-up
run-lab.sh            environment driver (build / up / sweep / down)
Makefile              convenience targets
poc/poc.py            the PoC (check / exploit / probe / mitigation)
exploit/exploit.py    standalone full-chain exploit
lab/lab.Dockerfile    builds both sides from upstream listener source
lab/vendor/           verbatim listener class from pre-fix / fix commits
lab/stubs.php         minimal Symfony/Contao dependency stubs
lab/harness.php       invokes the real listener as a non-admin
lab/service.py        HTTP wrapper (POST /check)
evidence/             captured runs of every mode on both sides
TRACKING.md           excluded (working record)

9. 参考资料

  • CVE 记录 — https://www.cve.org/CVERecord?id=CVE-2026-104883
  • GitHub 安全公告 — https://github.com/contao/contao/security/advisories/GHSA-r9qp-pqx5-8369
  • 修复提交 — https://github.com/contao/contao/commit/211498f28d4c86484b96eb0612c1193105b79e51
  • 早期加固 — 提交 2b83a60f7763(5.7.3,仅 tpl_editor)
下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    897
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    853
  • 3

    wifit3

    derv82/wifit3

    Wifite 但仅限 USB 且跨平台。

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer是一个开源的特权访问管理(PAM)平台,为DevOps和IT团队提供通过Web浏览器按需安全访问SSH、RDP、Kubernetes、数据库和RemoteApp端点的能力。

    448
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    417
  • 6

    SafeLine

    chaitin/safeline

    自托管WAF和反向代理,可过滤恶意HTTP流量、阻止SQL注入、XSS和机器人攻击,具备速率限制和动态HTML/JS加密功能。

    400

探索所有工具

浏览我们的工具集合

查看所有工具 →