Skip to main content
Vulnerability Database/CVE-2026-112305

CVE-2026-112305: Semaphore UI RCE Vulnerability

CVE-2026-112305 is a remote code execution flaw in Semaphore UI that lets attackers with task_runner role execute arbitrary commands by overriding Ansible variables. This post covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-112305 Overview

CVE-2026-112305 is a remote code execution vulnerability in Semaphore UI through version 2.19.16. The flaw allows authenticated users holding the task_runner role to override protected Ansible variables by injecting arbitrary keys into the task environment JSON. Attackers can submit crafted tasks that set ansible_ssh_common_args with a ProxyCommand payload, or set ansible_connection=local, to execute arbitrary commands under the Semaphore server account. Successful exploitation exposes encryption keys, SSH private keys, and stored secrets managed by Semaphore. The weakness is tracked under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes.

Critical Impact

Authenticated low-privilege users can achieve code execution on the Semaphore server and exfiltrate credentials, SSH keys, and encryption material.

Affected Products

  • Semaphore UI versions up to and including 2.19.16
  • Deployments exposing the task_runner role to untrusted or low-trust users
  • Self-hosted Semaphore instances built from the upstream GitHub repository

Discovery Timeline

  • 2026-10-19 - CVE-2026-112305 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-112305

Vulnerability Analysis

Semaphore UI exposes a task creation API that accepts a user-controlled JSON object representing the task environment. The API handler at api/projects/tasks.go passes this JSON forward to the task runner without filtering keys that control Ansible behavior. When the runner materializes the environment in services/tasks/TaskRunner.go, user-supplied keys merge with system-managed Ansible variables. This permits a task_runner user to override execution-sensitive variables that should be server-controlled, converting a normal task submission into a command execution primitive.

Root Cause

The root cause is improper control of dynamically-determined object attributes [CWE-915]. Semaphore does not maintain an allowlist or denylist for reserved Ansible variable names submitted via the task environment. Variables such as ansible_ssh_common_args, ansible_connection, ansible_python_interpreter, and related settings are treated as ordinary user data rather than privileged runtime configuration.

Attack Vector

An authenticated attacker with the task_runner role sends a POST request to the task creation endpoint containing an environment JSON body. By setting ansible_ssh_common_args to a value containing a ProxyCommand directive, the attacker causes Ansible or OpenSSH to spawn an arbitrary shell command when the task runs. Alternatively, setting ansible_connection=local forces Ansible to execute the playbook commands directly on the Semaphore host under the server user. Both paths yield code execution within the Semaphore process context, enabling retrieval of the Semaphore encryption key, stored SSH keys, and secret vault contents. Fix details are tracked in Pull Request #3888 and additional background is available in the VulnCheck advisory.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-112305

Indicators of Compromise

  • Task records whose environment JSON contains keys beginning with ansible_, especially ansible_ssh_common_args, ansible_connection, or ansible_python_interpreter.
  • Child processes of the Semaphore server executing shells (/bin/sh, /bin/bash) or network utilities (curl, wget, nc) not tied to the expected playbook content.
  • Outbound connections from the Semaphore host to attacker-controlled infrastructure immediately after task launches.
  • Unexpected reads of Semaphore configuration, SQLite/BoltDB stores, or ~/.ssh/ key files by the Semaphore service account.

Detection Strategies

  • Parse Semaphore application logs and database task records for environment fields containing reserved Ansible variable names.
  • Correlate task submissions by task_runner role users with subsequent anomalous process execution on the Semaphore host.
  • Alert on any ProxyCommand string appearing in task environment payloads or ansible.cfg overrides sourced from runtime.

Monitoring Recommendations

  • Enable process ancestry logging on the Semaphore host and ship events to a centralized analytics backend.
  • Monitor file access to secret storage paths, encryption key files, and SSH key directories owned by the Semaphore user.
  • Track outbound network connections initiated by the Semaphore service account and flag non-Git, non-registry destinations.

How to Mitigate CVE-2026-112305

Immediate Actions Required

  • Upgrade Semaphore UI to a release that includes the fix from Pull Request #3888; versions through 2.19.16 are vulnerable.
  • Rotate the Semaphore encryption key, all stored SSH keys, API tokens, and vaulted secrets after patching.
  • Audit the user directory and remove the task_runner role from any account that does not strictly require it.

Patch Information

The upstream fix adds validation that rejects reserved Ansible variable keys from the task environment payload. Review the changes in Pull Request #3888 and the related code paths in tasks.go and TaskRunner.go. Operators should pin to a Semaphore release that merges this change before re-enabling task execution for low-trust users.

Workarounds

  • Restrict network reachability of the Semaphore UI to administrators until the patch is applied.
  • Temporarily revoke the task_runner role from untrusted users and require administrator-reviewed task submissions.
  • Run Semaphore under a dedicated low-privilege service account with mandatory access controls to limit post-exploitation impact.
bash
# Configuration example: run Semaphore under an isolated systemd unit
# with reduced filesystem and capability scope until patched
[Service]
User=semaphore
Group=semaphore
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
CapabilityBoundingSet=
ReadWritePaths=/var/lib/semaphore

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.