
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.
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.
dangerouslySetInnerHTML.requestsInstall Python dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip3 install requests
Setup the Target Application (Termix): Ensure you have the vulnerable version of Termix (Release 1.9.0) extracted. Note: The exploit is designed to work with Termix Release 1.7.0 - 1.9.0.
wget https://github.com/Termix-SSH/Termix/archive/refs/tags/release-1.9.0-tag.zip
unzip release-1.9.0-tag.zip
Terminal 1 (Backend):
cd Termix-release-1.9.0-tag
npm install
npm run dev:backend
Wait until the backend server is fully started.
Terminal 2 (Frontend/Electron):
cd Termix-release-1.9.0-tag
npm run electron:dev
The Termix application window should open.
Setup SSH Access (Localhost):
The exploit connects to the victim's SSH server to upload the malicious file.
Ensure you have an SSH server running on port 22 or adjust the script accordingly.
User kali with the provided authorized key (or password) is used in the default config.
Execute the Exploit Script: Open a new terminal and run:
python3 exploit.py --user 'USERNAME' --pass 'PASSWORD'
Note: data provided matches the default credentials or the ones you registered.
Trigger the XSS:
/home/kali (or where the file was uploaded).cookie_stealer.svg to view it.Verify Success:
localStorage) and Cookies inside the box.exploit.py)The script performs the following actions:
localhost (using generated SSH keys).cookie_stealer.svg) containing the XSS payload.
<foreignObject> to embed HTML/JS inside SVG.<img src="https://raw.githubusercontent.com/themehackers/cve-2026-22804/HEAD/x" onerror="..."> triggers execution immediately upon rendering.Disclaimer: This code is for educational and testing purposes only. Do not use against systems you do not own or have permission to test.