CVE-2021-3533: Ansible - Race Condition Vulnerability

ansible Updated 02 Oct 2025

Summary

09/06/2021
Yes i
Unrated
Not published

CVE-2021-3533: A flaw was found in Ansible if an ansible user sets ANSIBLE_ASYNC_DIR to a subdirectory of a world writable directory. Affects ansible versions < 3.0.0. Fixed in 3.0.0. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 in the industry due to its simplicity and flexibility. Ansible Tower is a web-based interface and REST API for Ansible that provides a user-friendly dashboard, role-based access control, job scheduling, and more. Ansible Automation Platform is a comprehensive solution that combines Ansible Tower with additional features for enterprise-scale automation. Both Ansible Tower 3.7 and Ansible Automation Platform 1.2 are affected by a race condition vulnerability.

Vulnerability Detail

The vulnerability (CVE-2021-3533) arises when an ansible user sets the ANSIBLE_ASYNC_DIR environment variable to a subdirectory of a world-writable directory. This creates a race condition on the managed machine, allowing a malicious non-privileged account on the remote machine to exploit the race condition and gain unauthorized access to the async result data. This vulnerability can lead to unauthorized disclosure of sensitive information and potential privilege escalation. It is important to note that this vulnerability only affects Ansible Tower 3.7 and Ansible Automation Platform 1.2.

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

3.0.0

This is the first release that contains the fix.

pip install --upgrade "ansible==3.0.0"

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

Workaround

As a workaround, users can avoid setting the ANSIBLE_ASYNC_DIR environment variable to a subdirectory of a world-writable directory. By ensuring that the ANSIBLE_ASYNC_DIR points to a directory with restricted permissions, the race condition can be mitigated. Here is an example of how to set the ANSIBLE_ASYNC_DIR variable to a safe directory:

export ANSIBLE_ASYNC_DIR=/path/to/safe/directory

Conclusion

The race condition vulnerability in Ansible (CVE-2021-3533) can be exploited by a malicious non-privileged account on the remote machine to gain unauthorized access to async result data. This can lead to unauthorized disclosure of sensitive information and potential privilege escalation. Users should upgrade to a fixed version of Ansible and follow the recommended steps to mitigate the vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

This vulnerability affects Ansible Tower 3.7 and Ansible Automation Platform 1.2. Other versions of Ansible are not affected.

The vulnerability allows a malicious non-privileged account on the remote machine to access async result data, potentially leading to unauthorized disclosure of sensitive information and privilege escalation.

Yes, the vulnerability has been fixed in Ansible version 3.0.0 and later. Users should upgrade to a fixed version to mitigate the vulnerability.

Yes, users can avoid setting the ANSIBLE_ASYNC_DIR environment variable to a subdirectory of a world-writable directory as a temporary workaround. By setting the variable to a directory with restricted permissions, the race condition can be mitigated.

You can find more information about this vulnerability in the official Ansible documentation and the CVE-2021-3533 advisory.

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

If you need the minimum change

3.0.0

This is the first release that contains the fix.

pip install --upgrade "ansible==3.0.0"

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