Loopback services are easy to treat as internal. They are not. A browser can often reach 127.0.0.1, and a WebSocket server is responsible for deciding which origins may connect. In this case, visiting one attacker-controlled HTTP page was enough to begin the chain.
The affected company and product are intentionally omitted. Product-specific paths, message names, screenshots, and version identifiers have been generalized. The vulnerability mechanics and remediation lessons are unchanged.
The first primitive: a writable local socket
The desktop application started two neighboring loopback services whenever a project and its built-in script editor were open: an HTTP server for the editor interface and a WebSocket server for editor commands. Their ports were selected from the bounded ephemeral range 49152–65535.
That range was large enough to make guessing one port inconvenient, but small enough to search. The proof used a two-phase scan: concurrent fetch() requests first found responsive HTTP ports across the range, then sequential WebSocket probes checked the neighboring ports for the editor service's identifying message. The entire discovery completed in roughly five seconds without knowing a port in advance.
The server accepted connections without a session secret and did not validate the browser's Origin header. Once connected, a page could call the same read and write operations used by the application's own editor.
// Simplified connection logic
socket.on("message", message => {
dispatchEditorCommand(message); // no token, no Origin check
});
The write operation accepted a project-relative path. It was intended to save source files in the open project, but it also allowed paths that reached the project's plugin directory. The attacker never needed to know where the project lived on disk.
A port chosen from a known range is not an authentication boundary. Here, a web page could search the range and positively identify the intended service in seconds.
The second primitive: plugins that load from the project
Projects could contain plugins. When a project was opened or reloaded, the application discovered plugin folders automatically and read a small manifest describing the plugin and the capabilities it wanted.
The attacker-controlled page used the local editor socket to place two files inside the project: a plugin manifest and a script. The manifest requested filesystem and subprocess capabilities; the script used the granted subprocess capability to run a host command.
// Deliberately generic pseudocode
writeProjectFile("../Plugins/Project/manifest.json", manifest);
writeProjectFile("../Plugins/Project/main.js", payload);
// On the next project load
Process.spawnSync("benign-proof-command");
Putting the chain together
- The application is open with a project and its script editor active, which is a normal working state.
- The victim visits an attacker-controlled HTTP page.
- The page finds the loopback WebSocket and writes a plugin into the already-open project. No prompt appears.
- The project is saved, reopened, or reloaded during ordinary work.
- A single dialog asks whether to trust and load the project. Once approved, the planted plugin executes immediately as the victim user.
The dialog displayed the attacker-chosen plugin name and the requested capability labels, but it did not explain that the plugin had just appeared, where it came from, its path or code, or whether it was signed. A generic name made the prompt look like routine project setup. The single approval granted both requested capabilities; there was no second prompt and no application restart.
The browser was mitigation by accident
The attacker page had to be served over plain HTTP because an HTTPS page cannot open the required insecure ws:// connection. In testing, a public HTTP origin could complete discovery and writing in Safari and Firefox. Chrome and Brave blocked that public-origin route through Private Network Access, but allowed it from a private or local-network page. Firefox showed the inverse behavior for the tested private-network case.
A malicious project or any local process skipped the browser restriction entirely. None of that variance repaired the application defect: the service itself had no authentication and no origin policy. Browser behavior merely changed which delivery routes were convenient.
Impact
After the one approval, the plugin ran inside the application's privileged plugin runtime and invoked the host subprocess API as the desktop user. The proof launched a benign local application and created a marker file immediately. A real attacker could instead read source projects and credentials, run additional tools, establish persistence, or exfiltrate local files.
The important part was not any one API. It was the composition:
- a browser-reachable local control plane;
- an unauthenticated project file-write primitive;
- automatic discovery of project-scoped executable code; and
- a consent prompt with too little provenance information.
How to fix the class, not only the path
Canonicalizing file paths is necessary, but it does not repair the trust boundary. The local service should require an unguessable per-session secret, validate Origin and Host, and bind each command to the project and editor session that created the token.
Project plugins also need provenance. Newly added or unsigned plugins should be distinguished from known project content, and host-reaching capabilities should not be granted to silently introduced code through a single routine-looking action.
Authenticate loopback services. Validate WebSocket origins. Restrict project-relative writes after canonicalization. Record plugin provenance. Separate approval for process execution. Treat browser private-network protections as defense in depth, never as the primary control.
Closing thought
Each individual feature was understandable: a local editor socket, project plugins, and a permissions dialog. The vulnerability existed in the seams between them. That is where desktop application testing earns its keep.
