Increasing the Impact of Blind XSS When Triggered in Electron.js
A profile name field accepted HTML that was rendered unsanitised in a separate customer-service chat subdomain, so a stored cross-site scripting payload executed in the chat agent's browser. Because the agent used an Electron.js desktop app, the payload ran locally and allowed the researcher to read files from the victim's disk, including JavaScript source files and private API keys.
Hello I’m am7maaz I started bug hunting in March 2025 and I’ll try to share my findings throw this blog page .pushing my self to the limit to find vulns and fight against the odds.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the profile name was stored without sanitisation and rendered as HTML in the customer-service chat interface, and the Electron app exposed local file access to that rendered content.
Impact
An attacker could run script in a customer-service agent's Electron app and read local files, including JavaScript source and private API keys, though the exploit depended on a human agent opening the chat.
What the attacker needed
A free account; victim is a human chat agent; agent uses the Electron desktop app
How it was found
- Create an account on the target and explore the application.
- Set the profile name to an HTML payload with an event handler.
- Open the 'Talk to Client Service' button, which redirects to another subdomain where the name is shown.
- Use an XSS Hunter payload to confirm the script fires in the agent's browser.
- Use XSS Hunter's file retrieval feature to request JavaScript file paths on the agent's machine.
- Use imports found in retrieved files to discover further file paths and sensitive data.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A profile name is supposed to be plain text, but this site stored whatever was typed and later displayed it as if it were part of the web page. That let the researcher's name run a small script inside the chat agent's browser. The agent was using a desktop app built with Electron, which is a way of packaging a website as a program; scripts running there can sometimes read files on the computer, which is how source files and keys were taken.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.