GHSA-wwwh-47wp-m522 CVE-2015-6240 PYSEC-2017-3
Ansible Sandbox Escape via Symlink Attack
- Severity
- 0.0 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 0.45%
- Chance of exploitation in the next 30 days. Higher than 38.88% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-59 Improper Link Resolution Before File Access ('Link Following')
- Fix
1.9.2- Upgrade ansible to this version or later
Description
The chroot, jail, and zone connection plugins in ansible before 1.9.2 allow local users to escape a restricted environment via a symlink attack.
Affected versions
PyPI
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
ansible PyPI → 1.9.2
- pip
pip install --upgrade "ansible>=1.9.2"- poetry
poetry add "ansible>=1.9.2"- uv
uv add "ansible>=1.9.2"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Attack vector
- Local
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Low
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.0 7.8
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-59: Improper Link Resolution Before File Access ('Link Following')
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
How to prevent it
- Architecture and Design: Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
References
Advisories
Packages
Other links
- github.com/ansible/ansible/commit/952166f48eb0f5797b75b160fd156bbe1e8fc647
- github.com/ansible/ansible/commit/ca2f2c4ebd7b5e097eab0a710f79c1f63badf95b
- bugzilla.redhat.com/show_bug.cgi
- github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2017-3.yaml
- lists.debian.org/debian-lts-announce/2019/09/msg00016.html
- openwall.com/lists/oss-security/2015/08/17/10
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-8ggh-xwr9-3373 Ansible Community General Collection is vulnerable to exposure of sensitive information | Medium | Also affects ansible |
| GHSA-jpvw-p8pr-9g2x Ansible symlink attack vulnerability | Medium | Also affects ansible |
| GHSA-cpx3-93w7-457x Ansible leaks password to logs | High | Also affects ansible |
| GHSA-fh5v-5f35-2rv2 Insertion of Sensitive Information into Log File in ansible | Medium | Also affects ansible |
| GHSA-4r65-35qq-ch8j Ansible discloses sensitive information in traceback error message | Medium | Also affects ansible |
| GHSA-2pfh-q76x-gwvm Improper Input Validation and Command Injection in Ansible | High | Also affects ansible |
| PYSEC-2021-126 A flaw was found in Ansible if an ansible user sets ANSIBLE_ASYNC_DIR to a subdirectory of a world writable directory. | Not rated yet | Also affects ansible |
| GHSA-r6h7-5pq2-j77h Insufficiently random values in Ansible | Medium | Also affects ansible |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor