Improper Input Validation and Command Injection in Ansible
Published 23 Sept 2021 · Updated 6 Sept 2024
Is your project on an affected ansible?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <2.9.23rc1
- Fixed in
- 2.9.23rc1
pip install 'ansible>=2.9.23rc1'- Affected
- >=2.10.0a1 <2.10.11rc1
- Fixed in
- 2.10.11rc1
pip install 'ansible>=2.10.11rc1'- Affected
- >=2.11.0a1 <2.11.2rc1
- Fixed in
- 2.11.2rc1
pip install 'ansible>=2.11.2rc1'Details
A flaw was found in Ansible, where a user's controller is vulnerable to template injection. This issue can occur through facts used in the template if the user is trying to put templates in multi-line YAML strings and the facts being handled do not routinely include special template characters. This flaw allows attackers to perform command injection, which discloses sensitive information. The highest threat from this vulnerability is to confidentiality and integrity.
Is GHSA-2pfh-q76x-gwvm in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected ansible, and gives you the command that fixes it.
More advisories for ansible
- MediumCVE-2025-14010Ansible Community General Collection is vulnerable to exposure of sensitive information · 4 Dec 2025
- MediumCVE-2020-25635Ansible does not collect garbage after playbook run · 31 Oct 2025
- MediumCVE-2023-5115Ansible symlink attack vulnerability · 28 Dec 2023
- HighCVE-2022-3697Ansible leaks password to logs · 28 Oct 2022
- HighCVE-2021-20228Ansible Exposes Sensitive Information · 25 May 2022
- CriticalCVE-2014-4678Ansible Code Injection Vulnerability · 24 May 2022
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-3583
- Linkgithub.com/ansible/ansible/pull/74960
- Linkgithub.com/ansible/ansible/commit/03aff644cc1c00e1f7551195c68fbd0d13a39e6e
- Linkgithub.com/ansible/ansible/commit/8aa850e3573e48c9a2f12aef84e8a3a6f5ba4847
- Linkgithub.com/ansible/ansible/commit/8b17e5b9229ffaecfe10a4881bc3f87dd2c184e1
- Linkbugzilla.redhat.com/show_bug.cgi?id=1968412
- Advisorygithub.com/advisories/GHSA-2pfh-q76x-gwvm
- Packagegithub.com/ansible/ansible
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2021-358.yaml
- Linklists.debian.org/debian-lts-announce/2023/12/msg00018.html
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.