Critical OS Command Injection Vulnerability in Ansible Package

ansible Updated 02 Oct 2025

Summary

31/03/2020
N/A
Yes i
Medium
5.6

ALPINE-CVE-2019-14905: A vulnerability was found in Ansible Engine versions 2.9.x before 2.9.3, 2.8.x before 2.8.8, 2.7.x before 2.7.16 and earlier, where in Ansible's nxos_file_copy module can be used to copy files to a flash or bootflash on... Affects ansible versions < 2.8.8-r0. Fixed in 2.8.8-r0. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested 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 simplifies the management of IT infrastructure. It allows users to automate tasks such as configuration management, application deployment, and orchestration. The tool is widely used for its simplicity and agentless architecture, making it a popular choice among system administrators. However, certain versions of Ansible have been found to contain a vulnerability that could allow malicious actors to execute arbitrary OS commands.

Vulnerability Detail

A vulnerability exists in Ansible Engine versions 2.9.x before 2.9.3, 2.8.x before 2.8.8, and 2.7.x before 2.7.16, specifically in the nxos_file_copy module. This module can be exploited to copy files to flash or bootflash on NXOS devices. By crafting a malicious filename parameter, an attacker could perform OS command injections, leading to potential data breaches and loss of system confidentiality. The CVSS score for this vulnerability is 5.6, indicating a moderate severity level.

How To Fix

Minimum fixed version

2.8.8-r0

This is the first release that contains the fix.

sudo apk add --upgrade ansible

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using the nxos_file_copy module until the package is updated. Additionally, ensure that proper input validation is implemented to sanitize filename parameters.

Conclusion

The vulnerability in the Ansible package poses a significant risk due to the potential for OS command injection. Users are strongly advised to update their packages to the latest patched versions to safeguard their systems. Regular monitoring for vulnerabilities, such as through Vulert, can help maintain security in open-source software.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

The vulnerability allows for OS command injection through the nxos_file_copy module in Ansible.

Ansible versions 2.9.x before 2.9.3, 2.8.x before 2.8.8, and 2.7.x before 2.7.16 are affected.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability.

The CVSS score for this vulnerability is 5.6, indicating a moderate severity level.

If an immediate update is not possible, refrain from using the nxos_file_copy module and implement input validation to mitigate risks.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

How To Fix

Minimum fixed version

2.8.8-r0

This is the first release that contains the fix.

sudo apk add --upgrade ansible

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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