Junglewise Threat Intelligence

CVE-2026-39862: Shopify Tophat remote code execution via command injection

CVE-2026-39862 · Severity: high · CVSS 8.8 · Published 2026-04-08

Vendors: Shopify.

Executive brief

Tophat, a mobile application testing tool used by developers, is vulnerable to a flaw that allows attackers to take control of a developer's macOS workstation. By tricking a user into clicking a specially crafted link, an attacker can execute malicious commands with the same permissions as the logged-in user. This could lead to the theft of source code, credentials, or full system compromise.

Technical details

A command injection vulnerability (CWE-78) exists in Shopify Tophat prior to version 2.5.1. The application fails to sanitize the 'arguments' query parameter when parsing 'tophat://' or 'http://localhost:29070' URLs. This unsanitized input is passed directly to '/bin/bash -c' for execution. An attacker can exploit this by crafting a malicious URL that, when opened by a developer with Tophat installed, executes arbitrary shell commands with the user's privileges. For previously trusted build hosts, the execution may occur without a confirmation dialog. The issue is resolved in version 2.5.1 by implementing shell escaping for arguments and an allowlist for permitted characters.

Affected products

  • Shopify Tophat < 2.5.1

Timeline

  • 2026-03-30: patched: Fix merged in pull request #139
  • 2026-04-08: disclosed: Vendor advisory published
  • 2026-04-08: advisory: NVD published CVE-2026-39862

References