Skip to main content

Ansible jailexec CVE-2026-55074

| EUVDEUVD-2026-83940 HIGH
Improper Link Resolution Before File Access (CWE-59)
2026-08-12 https://github.com/chofstede/ansible_jailexec GHSA-cxgv-hp74-jj7r PYSEC-2026-3658
8.2
CVSS 4.0 · Vendor: https://github.com/chofstede/ansible_jailexec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain control inside managed jail
  2. Delivery
    Plant symlink at/above task destination
  3. Exploit
    Operator runs put_file (copy/template/fetch) task
  4. Execution
    Host-side root mv follows symlink
  5. Persist
    Arbitrary root-owned write on host
  6. Impact
    Escalate via cron/rc.d/authorized_keys to host root

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Exploitation requires ALL of: (1) an attacker who controls content inside a managed FreeBSD jail - the jail's root or any process able to create a symlink in a directory the transfer will touch; (2) the ability to place that symlink at or above the task's destination BEFORE the transfer runs (a timing/race precondition); and (3) the operator subsequently running a put_file-based task (copy/template/fetch) against that jail via ansible-jailexec < 2.0.0. Limiting factors: the attacker must already have a foothold inside the jail (not a purely external unauthenticated position), success depends on winning the placement-before-transfer window, and it is confined to hosts using this specific FreeBSD-jail plugin. Not exploitable on 2.0.0+, where transfers run inside the jail via jexec so all paths resolve within the chroot.

Impact

This is a genuine high-impact issue but with meaningful preconditions, so raw severity should be read against exploitability. The vendor's CVSS 4.0 vector (8.2, AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N) overstates remoteness and understates the outcome: the attacker does not act over the network against the plugin - they must already control content INSIDE a managed FreeBSD jail (be jail-root, or hold any process able to create a symlink in a directory a later Ansible task writes to), which is a privileged foothold, not PR:N. Conversely, the impact is understated: a symlink-followed, host-side, root-privileged mv yields an arbitrary root-owned write OUTSIDE the jail - a full jail escape that the advisory itself notes is readily escalated to complete host compromise (cron, rc.d, authorized_keys), i.e. a scope-changing C:H/I:H/A:H on the host, not integrity-only. No EPSS score, no CISA KEV listing, and no public POC are present in the provided data, so there is no public exploit identified at time of analysis; combined with the AC:H timing/precondition and the niche footprint, this is a real fix-it-when-you-upgrade priority for the small population running the plugin rather than a mass-exploitation threat. Patch availability is CONFIRMED (v2.0.0). Note the metadata conflict: CVSS says AV:N while the attack fundamentally requires an attacker-controlled position inside the jail - treat as a local/foothold-gated escape.

Exploit ScenarioDerived

An attacker with control of a FreeBSD jail (e.g. compromised jail-root or a service running inside it) plants a symlink such as the jail's /usr/local/etc pointing at the host's /etc, then waits. When the operator runs a routine Ansible copy/template/fetch task through the jailexec plugin, put_file resolves the destination on the host side and the root-privileged mkdir -p/mv follow the symlink, writing an attacker-chosen file as root on the host (e.g. /etc/cron.d entry or an authorized_keys), yielding host root. No public exploit code was identified, but the technique is fully described in the vendor advisory and patch.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Sep 21, 2026

Symlink following in the ansible_jailexec Ansible connection plugin (pip package ansible-jailexec) through version 1.3.0 lets an attacker who already controls content inside a managed FreeBSD jail convert any Ansible copy/template/fetch task into an arbitrary root-owned write on the jail host, achieving a full jail escape that is readily escalated to host compromise via cron, rc.d or authorized_keys. The plugin resolved a transfer's destination as the on-host jail path plus the requested destination and ran 'mkdir -p' and 'mv' there as root outside the jail; because those commands dereference symlinks, a symlink planted inside the jail at or above the task's destination is followed by the host-side root mv. The authoritative assessment rates this AV:L/AC:H/PR:L/S:C with C:H/I:H/A:H, i.e. genuine high impact but gated on an existing foothold inside the jail and on winning a placement-before-transfer race; no public exploit code has been identified at time of analysis, and version 2.0.0 fixes the issue.

Earlier versions of this analysis (1)
v1 Aug 13, 2026 - 00:07

Symlink-following jail escape in the ansible-jailexec FreeBSD connection plugin (versions through 1.3.0) allows a party controlling content inside a managed jail to achieve arbitrary root-owned file writes on the jail host. The put_file method resolves transfer destinations as the jail's filesystem root concatenated with the task's target path, then executes mkdir -p and mv on the host as root - outside the jail's chroot - enabling any symlink planted inside the jail to redirect those writes to arbitrary host paths. An attacker already present inside a managed jail who can anticipate or observe Ansible playbook execution can thereby escape the jail boundary entirely, writing cron jobs, rc.d scripts, or authorized_keys entries to the host and achieving full host compromise. No public exploit has been identified at time of analysis; vendor-released patch 2.0.0 is available.

RemediationAI

Primary fix: upgrade the ansible-jailexec pip package to 2.0.0 or later (vulnerable range is < 2.0.0; 2.0.0 is the exact fixed release), which rewrites transfers to execute inside the jail via jexec so all paths resolve within the chroot. The upstream fix is available as commit 6e80eecb2db7aebd1258fded6ae5c3aba1dd4123 and the v2.0.0 tag, tracked by pull request https://github.com/chofstede/ansible_jailexec/pull/6 and documented at https://github.com/chofstede/ansible_jailexec/blob/main/docs/security/advisory-2.0.0-jail-escape.md. Vendor workarounds for affected versions: none - the advisory explicitly states there is no mitigation short of upgrading to 2.0.0, so interim compensating controls must be organizational and are imperfect: treat every jail whose content is not fully trusted as capable of writing arbitrary root-owned files on its host, and restrict or defer put_file-based tasks (copy/template/fetch) against such jails until the package is upgraded, accepting the loss of those workflows as the trade-off. Do not rely on cleaning up planted symlinks beforehand, since any directory the transfer touches can be re-planted between cleanup and transfer. When upgrading, note the behavior changes: transfers now run as ansible_jail_user inside the jail rather than as root on the host (add become: yes to tasks that must write root-owned paths inside the jail), the plugin's host-side doas/sudo rules can be reduced to jexec alone, ansible_jail_root is now ignored and warns when set, and jails must provide /bin/sh and cat from the FreeBSD base system. A release-level patch is available per vendor, so no unsupported workaround is needed.

Affected VersionsENISA

ansible_jailexec < 2.0.0

Affected Packages

pypi ansible-jailexec fix: 2.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ansible_jailexec is an Ansible connection plugin that reaches tasks inside a FreeBSD jail by SSH-ing to the jail host and wrapping every command in jexec, so the jail needs no sshd or routable address of its own. In affected releases the file-transfer path (put_file, used by copy/template/fetch-style tasks) did not run inside the jail at all: it concatenated the jail's on-host filesystem root with the requested destination and executed 'mkdir -p' followed by 'mv' on the host, as root, outside the chroot. This is a classic CWE-59 (Improper Link Resolution Before File Access / link following) defect - the privileged host-side command resolves symlinks in a path tree that untrusted jail content controls. A jail root, or any process that can create a symlink in a directory an Ansible task later writes to, therefore redirects a root-owned write to any host path, and arbitrary root-owned host writes give straightforward escalation to code execution (cron jobs, rc.d scripts, authorized_keys). The fix in 2.0.0 moves all transfer plumbing inside the jail via 'jexec <jail> /bin/sh -c "mkdir -p <dir> && cat > <dest>"' for put_file and 'cat < <src>' for fetch_file, so every path - and every symlink - resolves inside the jail's chroot and can at most redirect within the same jail. The related package identifier in the CPE data is pkg:pip/ansible-jailexec, and the change also removed the host-side mkdir/mv/rm privilege rules, leaving only jexec.

Know when Freebsd gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/chofstede/ansible_jailexec) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

Attacker needs an in-jail foothold (AV:L/PR:L) and must win a symlink-before-transfer race (AC:H); the jail-to-host escape is a scope change (S:C) yielding root host compromise (C/I/A:H).

3.1 AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H

Primary rating from Vendor (https://github.com/chofstede/ansible_jailexec).

CVSS VectorVendor: https://github.com/chofstede/ansible_jailexec

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Sep 21, 2026 - 15:43 vuln.today
v2 - CVSS changed
CVSS changed
Sep 21, 2026 - 15:37 NVD
8.2 (HIGH)
CVE Published
Aug 12, 2026 - 23:21 cve.org
HIGH

DescriptionCVE.org

Through version 1.3.0, the jailexec connection plugin's put_file resolved a transfer's destination to a path on the jail host (<jail filesystem root> + <destination>) and ran mkdir -p and mv there as root on the host. Those commands follow symbolic links, and the path was operated on outside the jail, so a symlink existing inside the jail was followed by the host-side, root-privileged mv.

A party controlling content inside a managed jail (the jail's root, or any process able to create a symlink in a directory an Ansible task later writes to) can therefore cause an arbitrary root-owned write on the host, outside the jail - a full jail escape. Arbitrary root-owned host writes are readily escalated to host compromise (e.g. cron, rc.d, authorized_keys).

Preconditions: the operator runs a copy/template/fetch-style task (anything using put_file) against the jail, and the attacker can place a symlink inside the jail at or above the task's destination before the transfer runs.

Patches: Fixed in 2.0.0. File transfers now run inside the jail via jexec (mkdir -p <dir> && cat > <dest> for put_file; cat < <src> for fetch_file), so every path resolves within the jail's chroot. An in-jail symlink can at most redirect within the same jail and can no longer reach the host.

Workarounds: None in affected versions; upgrade to 2.0.0.

Resources:

  • https://github.com/chofstede/ansible_jailexec/blob/main/docs/security/advisory-2.0.0-jail-escape.md
  • https://github.com/chofstede/ansible_jailexec/pull/6

Executive ViewAI

Why It Matters

The ansible_jailexec Ansible connection plugin (pip package ansible-jailexec, versions through 1.3.0) contains a symlink-following flaw that allows an authenticated, low-privileged attacker who already controls content inside a managed FreeBSD jail to redirect Ansible copy, template, and fetch operations into arbitrary root-owned file writes on the jail host, breaking jail isolation and enabling escalation to full host compromise. Because a single compromised jail can therefore undermine the isolation protecting every other tenant and the host itself, and because Ansible automation typically runs with broad elevated credentials, leadership should treat this as a material risk to multi-tenant FreeBSD estates and release pipelines.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Rare
niche FreeBSD-jail Ansible connection plugin, tiny hobby/OSS install base
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

CVE-2012-0217 HIGH POC
7.2 Jun 12

The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and

CVE-2025-14558 HIGH POC
7.2 Mar 09

The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess

CVE-2020-1967 HIGH POC
7.5 Apr 21

Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due

CVE-2013-4854 HIGH POC
7.8 Jul 29

The RFC 5011 implementation in rdata.c in ISC BIND 9.7.x and 9.8.x before 9.8.5-P2, 9.8.6b1, 9.9.x before 9.9.3-P2, and

CVE-2024-6387 HIGH POC
8.1 Jul 01

Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to

CVE-2019-6111 MEDIUM POC
5.9 Jan 31

An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no

CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2013-2171 MEDIUM POC
6.9 Jul 02

The vm_map_lookup function in sys/vm/vm_map.c in the mmap implementation in the kernel in FreeBSD 9.0 through 9.1-RELEAS

CVE-2021-3449 MEDIUM
5.9 Mar 25

An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med

CVE-2016-5766 HIGH POC
8.8 Aug 07

Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used

CVE-2016-1879 HIGH POC
7.5 Jan 29

The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w

CVE-2020-7457 HIGH POC
8.1 Jul 09

In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy