CVE-2019-3828: Path Traversal Vulnerability in Ansible

ansible Updated 02 Oct 2025

Summary

27/03/2019
Yes i
Low
4.2

CVE-2019-3828: Ansible fetch module before versions 2.5.15, 2.6.14, 2.7.8 has a path traversal vulnerability which allows copying and overwriting files outside of the specified destination in the local ansible controller host, by not r... Affects ansible across 3 version ranges.

>= 2.5.0, < 2.5.15 >= 2.6.0, < 2.6.14 >= 2.7.0, < 2.7.8

Fixed in 2.5.15, 2.6.14 or 2.7.8, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2019-3828 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ansible is an open-source automation tool that allows users to automate IT tasks such as configuration management, application deployment, and orchestration. It is widely used for managing and provisioning infrastructure. The Ansible fetch module is responsible for copying files from remote hosts to the local Ansible controller host. However, versions prior to 2.5.15, 2.6.14, and 2.7.8 have a path traversal vulnerability that allows an attacker to copy and overwrite files outside of the specified destination on the local Ansible controller host. This vulnerability can be exploited by not restricting an absolute path.

Vulnerability Detail

The path traversal vulnerability in the Ansible fetch module allows an attacker to access and modify files outside of the intended destination. By manipulating the file path, an attacker can overwrite critical system files or gain unauthorized access to sensitive information. This can lead to a variety of security issues, including remote code execution, privilege escalation, and data leakage. It is important to note that this vulnerability only affects Ansible versions prior to 2.5.15, 2.6.14, and 2.7.8.

How To Fix

Latest published version: 14.5.0 as of 22 Oct 2026

pip install --upgrade "ansible==14.5.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.5.0, < 2.5.15 2.5.15
    pip install --upgrade "ansible==2.5.15"
  • >= 2.6.0, < 2.6.14 2.6.14
    pip install --upgrade "ansible==2.6.14"
  • >= 2.7.0, < 2.7.8 2.7.8
    pip install --upgrade "ansible==2.7.8"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, users can implement input validation and sanitization to ensure that file paths are restricted to the intended destination. This can be achieved by validating user input and enforcing strict file path restrictions. Here is an example of how to sanitize file paths in Python:

import os

def sanitize_file_path(file_path):
    base_path = '/path/to/destination'
    sanitized_path = os.path.abspath(os.path.join(base_path, file_path))
    if not sanitized_path.startswith(base_path):
        raise ValueError('Invalid file path')
    return sanitized_path

Conclusion

The path traversal vulnerability in Ansible's fetch module can have serious security implications, allowing attackers to access and modify files outside of the intended destination. It is crucial to upgrade to the latest version of Ansible (2.5.15, 2.6.14, or 2.7.8) to mitigate this vulnerability. Implementing input validation and sanitization can serve as a temporary workaround until the upgrade is performed. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

The path traversal vulnerability in Ansible's fetch module allows an attacker to access and modify files outside of the intended destination. This can lead to remote code execution, privilege escalation, and data leakage.

Versions prior to 2.5.15, 2.6.14, and 2.7.8 are affected by this vulnerability.

At the time of this advisory, there are no known public exploits targeting this vulnerability. However, it is important to patch your Ansible installation to prevent potential exploitation.

You can use the Vulert playground at Vulert Scanner to check if your Ansible installation is affected by this vulnerability. Simply provide your Pipfile.lock and the playground will analyze it for any open-source vulnerabilities, including CVE-2019-3828.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

How To Fix

Latest published version: 14.5.0 as of 22 Oct 2026

pip install --upgrade "ansible==14.5.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.5.0, < 2.5.15 2.5.15
    pip install --upgrade "ansible==2.5.15"
  • >= 2.6.0, < 2.6.14 2.6.14
    pip install --upgrade "ansible==2.6.14"
  • >= 2.7.0, < 2.7.8 2.7.8
    pip install --upgrade "ansible==2.7.8"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback