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

CVE-2026-103754: Ansible Runner Path Traversal Vulnerability

CVE-2026-103754 is a path traversal flaw in ansible-runner affecting the unstream_dir() function. Attackers can leverage crafted archives to create files or modify permissions outside target directories, potentially leading to code execution. This article covers technical details, affected versions, impact analysis, and mitigation strategies.

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-103754 Overview

CVE-2026-103754 is a path traversal vulnerability [CWE-22] in ansible-runner. The flaw resides in the unstream_dir() function, which extracts streamed zip archives on the worker side of the ansible-runner transmit/worker protocol. The function re-creates symbolic links from archive content without validating link targets and applies chmod() and utime() to unsanitized filesystem paths derived from archive member names. A worker consuming attacker-influenced input can be coerced into writing files, creating symbolic links, or changing permissions outside the intended target directory. These primitives can be chained toward code execution on the worker host.

Critical Impact

A crafted zip archive processed by an ansible-runner worker can create files or symbolic links outside the extraction directory and modify permissions on arbitrary paths, enabling code execution under the worker account.

Affected Products

Discovery Timeline

  • 2026-10-01 - CVE CVE-2026-103754 published to NVD
  • 2026-10-01 - Last updated in NVD database

Technical Details for CVE-2026-103754

Vulnerability Analysis

The ansible-runner transmit/worker protocol streams a zip archive from a controller to a worker process. The worker then invokes unstream_dir() to materialize that archive into a staging directory on disk. The implementation iterates over archive members and reconstructs file content, symbolic links, and metadata.

Two unsafe operations drive the vulnerability. First, unstream_dir() recreates symbolic links using the target string stored in the archive without checking whether the target escapes the extraction root. Second, the function calls chmod() and utime() on paths assembled directly from member names, with no normalization or containment check against directory traversal sequences such as ../.

An attacker who can influence archive contents can plant a symlink inside the extraction directory and then supply a follow-up archive entry whose write operation traverses that symlink. The combination enables arbitrary file write, which is sufficient to drop executable payloads into locations the worker or a privileged process will read.

Root Cause

The root cause is missing path sanitization and link-target validation during archive extraction. The code trusts archive-provided names and link targets, violating the standard safe-extraction pattern of resolving each destination path and rejecting any entry that resolves outside the intended root.

Attack Vector

Exploitation requires an attacker to supply or influence a zip archive that reaches an ansible-runner worker. The CVSS vector indicates network reach with high attack complexity and low privileges required. The impact profile is high to integrity and low to availability, with no direct confidentiality loss from the primitive itself. Successful chaining can escalate to code execution in the context of the ansible-runner worker.

See the GitHub Pull Request #1550 for the technical remediation and the Red Hat Bug Report for additional context.

Detection Methods for CVE-2026-103754

Indicators of Compromise

  • Symbolic links inside ansible-runner staging or private-data directories whose targets resolve outside the extraction root.
  • Files written by the ansible-runner worker process to paths containing .. traversal segments or to directories outside the configured artifact location.
  • Unexpected chmod or utime syscalls originating from the ansible-runner worker against system paths such as /etc, /root/.ssh, or user home directories.

Detection Strategies

  • Audit ansible-runner worker processes for file-system writes that resolve outside the intended private data directory.
  • Instrument Python zipfile extraction paths with wrappers that log any member whose canonicalized destination escapes the target root.
  • Correlate archive ingestion events on the worker with subsequent file creations, symlink creations, and permission changes in sensitive directories.

Monitoring Recommendations

  • Enable Linux audit rules on symlinkat, chmod, and utimensat syscalls scoped to the ansible-runner service account.
  • Forward worker process telemetry to a centralized log store and alert on writes outside expected working directories.
  • Track package versions of ansible-runner across hosts and alert when vulnerable builds remain in production.

How to Mitigate CVE-2026-103754

Immediate Actions Required

  • Upgrade ansible-runner to a release containing the fix merged via GitHub Pull Request #1550.
  • Restrict which identities can submit transmit payloads to ansible-runner workers, treating that channel as a trust boundary.
  • Run ansible-runner workers under a dedicated, least-privileged service account with no write access to system directories.

Patch Information

Red Hat tracks remediation in the Red Hat CVE Advisory and the associated Red Hat Bug Report. The upstream fix is implemented in GitHub Pull Request #1550, which validates archive member paths and symbolic link targets before writing to disk. Apply vendor-provided packages as soon as they are available for your distribution.

Workarounds

  • Where immediate patching is not possible, disable or gate the transmit/worker protocol so only trusted controllers can deliver archives.
  • Execute ansible-runner workers inside a container or chroot that confines file-system writes to a non-sensitive directory tree.
  • Mount the ansible-runner working directory on a dedicated filesystem with nosuid and nodev to limit the value of arbitrary writes.
bash
# Configuration example: constrain ansible-runner worker via systemd
[Service]
User=ansible-runner
Group=ansible-runner
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/ansible-runner
NoNewPrivileges=true
PrivateTmp=true
RestrictSUIDSGID=true

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.