# Termix 文件管理器存储型XSS导致LFI和会话劫持
## 概述
Termix 是一款基于 Web 的服务器管理平台,提供 SSH 终端、隧道和文件编辑功能。在版本 1.7.0 至 1.9.0 中,其文件管理组件存在存储型跨站脚本(Stored XSS)漏洞。
## 影响版本
1.7.0 到 1.9.0
## 细节
漏洞位于 `src/ui/desktop/apps/file-manager/components/FileViewer.tsx`。应用在预览 SVG 文件时未对文件内容进行适当过滤和转义,导致恶意 SVG 文件可被执行。攻击者若已控制托管的 SSH 服务器,可上传恶意 SVG 文件,当用户通过 Termix 文件管理器预览该文件时,触发 XSS。
## 影响
攻击者可利用该漏洞在受害者浏览器中执行任意 JavaScript 代码,从而劫持用户会话、窃取敏感信息或进行其他恶意操作。该漏洞已在 1.10.0 版本中修复。
是否为 Web 类漏洞: 未知
判断理由:
| # | POC 描述 | 源链接 | 神龙链接 |
|---|---|---|---|
| 1 | This repository contains a Proof of Concept (PoC) exploit for the Stored Cross-Site Scripting (XSS) vulnerability in Termix, which can lead to Local File Inclusion (LFI) in the Electron environment and Session Hijacking. | https://github.com/ThemeHackers/CVE-2026-22804 | POC详情 |
标题: Stored XSS in File Manager leading to Local File Inclusion (LFI) in Electron and Session Hijacking in Browser · Advisory · Termix-SSH/Termix · GitHub -- 🔗来源链接
标签:x_refsource_CONFIRM
神龙速读:
- **Vulnerability**: Stored Cross-Site Scripting (XSS)
- **Severity**: High (CVSS v3.1: 8.0/10)
- **Affected Package**: github.com/Termix-SSH/Termix
- **Affected Versions**: 1.7.0 - 1.9.0
- **Patched Versions**: 1.10.0
- **CVE ID**: CVE-2026-22804
- **Weaknesses**: CWE-79, CWE-269
### Key Vulnerability Details:
- **File Manager Component**: Vulnerable to Stored XSS related to SVG file rendering due to improper sanitization.
- **Location**: `src/ui/desktop/apps/file-manager/components/FileViewer.tsx` in the `FileViewer.tsx` component.
### Attack Method:
#### 1. Web Browser Impact:
- **Injection Point**: SVG content rendered with `dangerouslySetInnerHTML`.
- **Exploit Script**: SVG payload containing an `onerror` handler can lead to arbitrary JavaScript execution within the application.
- **Session Hijacking**: Attacker can access `localStorage` and access JWT tokens to fully control the user’s account.
### 2. Electron Desktop Application Impact:
- **Configuration Issue**: `webSecurity: false` disables security protections like Same-Origin Policy.
- **Local File Read Exploit**: Attacker can use `fetch` calls in JavaScript payloads to read local files (e.g., `/etc/passwd`, `~/.ssh/id_rsa`) and send them to a remote server.
### Impact:
- **Local File Inclusion (LFI)** via XSS injection escalates into unauthorized access to sensitive files.
- **High Attack Complexity**: Requires remote server compromise and creating targeted malicious files for execution.
暂无评论