Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain control inside managed jail
-
DeliveryPlant symlink at/above task destination
-
ExploitOperator runs put_file (copy/template/fetch) task
-
ExecutionHost-side root mv follows symlink
-
PersistArbitrary root-owned write on host
-
ImpactEscalate 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
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
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).
Primary rating from Vendor (https://github.com/chofstede/ansible_jailexec).
CVSS VectorVendor: https://github.com/chofstede/ansible_jailexec
Lifecycle Timeline
3DescriptionCVE.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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
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
The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess
Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due
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
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
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
An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med
Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used
The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w
In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1
EUVD-2026-83940
GHSA-cxgv-hp74-jj7r
NVD
CVE.org
EPSS
Exploit-DB