CVE-2020-10729: Insufficiently Random Values in Ansible

ansible Updated 02 Oct 2025

Summary

27/05/2021
Yes i
Moderate
5.0

CVE-2020-10729: A flaw was found in the use of insufficiently random values in Ansible. Affects ansible versions < 2.9.6. Fixed in 2.9.6. How to fix ↓

Also tracked for

The same CVE-2020-10729 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Ansible is an open-source automation tool that allows users to automate IT tasks such as configuration management, application deployment, and orchestration. It uses a declarative language to describe system configurations and relies on SSH for communication with remote systems. Ansible is widely used in the industry due to its simplicity and scalability. However, a vulnerability has been discovered in Ansible versions before 2.9.6 that involves the use of insufficiently random values.

Vulnerability Detail

The vulnerability arises from the generation of random passwords in Ansible. When two random password lookups of the same length occur, they generate the same value as the template caching action for the same file. This happens because Ansible does not re-evaluate the password generation, leading to the exposure of all passwords for the file. The impact of this vulnerability is significant as it exposes sensitive passwords, potentially compromising the security of the system.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.9.6

This is the first release that contains the fix.

pip install --upgrade "ansible==2.9.6"

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

Workaround

If upgrading to the latest version is not immediately feasible, a possible workaround is to manually regenerate the passwords using a secure random number generator. This can be achieved by modifying the affected Ansible playbook or script to include a step that generates a new random password for each affected file. Here is an example of how this can be done in Python:

import random
import string

length = 10
new_password = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(length))

# Use the new_password variable in the playbook

Note that this workaround is temporary and should be replaced with the official fix as soon as possible.

Conclusion

In conclusion, the vulnerability in Ansible involving insufficiently random values can lead to the exposure of sensitive passwords. It is crucial to upgrade to Ansible Engine version 2.9.6 or later to mitigate this vulnerability. If immediate upgrading is not possible, a temporary workaround can be implemented. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

Ansible is an open-source automation tool used for configuration management, application deployment, and orchestration.

The vulnerability exposes all passwords for a file, potentially compromising the security of the system.

Versions of Ansible before 2.9.6 are affected by this vulnerability.

To fix this vulnerability, upgrade to Ansible Engine version 2.9.6 or later.

Yes, a temporary workaround is to manually regenerate the passwords using a secure random number generator.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.9.6

This is the first release that contains the fix.

pip install --upgrade "ansible==2.9.6"

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