首页 网络安全 正文
  • 本文约2604字,阅读需13分钟
  • 11
  • 0

Sanluan Publicms Preview.html重定向CVE-2025-7949

摘要

栋科技漏洞库关注到Sanluan PublicCMS版本至5.202506.a存在一个开放的重定向漏洞,该漏洞追踪为CVE-2025-7949,CVSS评分3.5。

PublicCMS采用2025年新版本主流JAVA技术开发;完全开源,架构科学,轻松支撑千万数据、千万PV;目前已拥有全球0.0005%的用户。

一、基本情况

PublicCMS提供了免费版本产品、免费技术支持,为企业快速建站,建设大规模站点提供强大驱动,也是企业级项目产品原型的良好选择。

Sanluan Publicms Preview.html重定向CVE-2025-7949

栋科技漏洞库关注到Sanluan PublicCMS版本至5.202506.a存在一个开放的重定向漏洞,该漏洞追踪为CVE-2025-7949,CVSS评分3.5。

二、漏洞分析

CVE-2025-7949漏洞是低危漏洞,影响 publiccms-parent/publiccms/src/main/resources/templates/admin/cmsDiy/preview.html 未知功能。

具体而言,该漏洞源于重定向函数的实现不安全,由于重定向参数是用户可控制的,无需安全检查,因此这导致了一个开放的重定向漏洞。

该漏洞影响Sanluan PublicCMS版本至5.202506.a,通过操纵参数url,可以导致开放重定向,攻击可以远程发起,且该漏洞已被公开披露。

官方补丁为c1e79f124e3f4c458315d908ed7dee06f9f12a76/f1af17af004ca9345c6fe4d5936d87d008d26e75,建议应用补丁以修复问题。

三、漏洞代码

‎1、

publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/cms/CmsWebFileAdminController.java

@@ -221,7 +221,7 @@ public String upload(@RequestAttribute SysSite site, @SessionAttribute SysUser a
    public String uploadIco(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, String path, MultipartFile file,
            String filename, String base64File, String originalFilename, int size, boolean overwrite, HttpServletRequest request,
            ModelMap model) {
        if (null != file && !file.isEmpty() || CommonUtils.notEmpty(base64File)) {
        if (filename.endsWith(".ico") && (null != file && !file.isEmpty() || CommonUtils.notEmpty(base64File))) {
            String originalName;
            String suffix;
            if (null != file && !file.isEmpty()) {
@@ -230,9 +230,9 @@ public String uploadIco(@RequestAttribute SysSite site, @SessionAttribute SysUse
                originalName = originalFilename;
            }
            suffix = CmsFileUtils.getSuffix(originalName);
            String filepath = CommonUtils.joinString(path, Constants.SEPARATOR, filename);
            String fuleFilePath = siteComponent.getWebFilePath(site.getId(), filepath);
            try {
                String filepath = CommonUtils.joinString(path, Constants.SEPARATOR, filename);
                String fuleFilePath = siteComponent.getWebFilePath(site.getId(), filepath);
                if (overwrite || !CmsFileUtils.exists(fuleFilePath)) {
                    CmsFileUtils.mkdirsParent(fuleFilePath);
                    if (CommonUtils.notEmpty(base64File)) {
@@ -250,6 +250,7 @@ public String uploadIco(@RequestAttribute SysSite site, @SessionAttribute SysUse
                            uploadResult.getHeight(), RequestUtils.getIpAddress(request), CommonUtils.getDate(), filepath));
                }
            } catch (IOException e) {
                CmsFileUtils.delete(fuleFilePath);
                model.addAttribute(CommonConstants.ERROR, e.getMessage());
                log.error(e.getMessage(), e);
                return CommonConstants.TEMPLATE_ERROR;

‎2、

publiccms-parent/publiccms/src/main/webapp/resource/plugins/pdfjs/viewer.html
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="google" content="notranslate">
    <title>PDF.js viewer</title>
    <script>
    var queryParams = new URLSearchParams(document.location.search.substring(1));
    if(queryParams.has("file") && navigator.userAgent.match(/iPhone|iPad|iPod/i) ) {
        document.location.href=queryParams.get("file");
    }
    </script>

    <!-- This snippet is used in production (included from viewer.html) -->
    <link rel="resource" type="application/l10n" href="locale/locale.json">

四、POC概念验证

http://localhost:8080/admin/cmsDiy/preview.html?url=//google.com

it will be redirected to google.com when user click "VIEW"  (<a tag's href link)

五、影响范围

Sanluan PublicCMS <= 5.202506.a

六、修复建议

Sanluan PublicCMS > 5.202506.a

七、参考链接

管理员已设置登录后刷新可查看



扫描二维码,在手机上阅读
评论
更换验证码
友情链接