CVE-2021-3583 json
Improper Input Validation and Command Injection in Ansible
published 5y ago modified 4mo ago also GHSA-2pfh-q76x-gwvm , PYSEC-2021-358 , EUVD-2021-0010
- cvss
- 7.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 59%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi ansible 2.9.23, 2.9.23rc1, 2.10.11rc1, 2.11.2rc1
- redhat ansible_engine 2.9.23
- redhat ansible_tower 3.7.0
- ansible Debian 14, Debian 13, Debian 12 5.4.0-1
- ansible-core Debian 14, Debian 13, Debian 12 2.12.0-1
debian advisories DEBIAN-CVE-2021-3583
- ansible Ubuntu Pro 16.04 LTS 2.0.0.2-2ubuntu1.3+esm1
- ansible Ubuntu Pro 18.04 LTS 2.5.1+dfsg-1ubuntu0.1+esm1
- ansible Ubuntu Pro 20.04 LTS 2.9.6+dfsg-1ubuntu0.1~esm1
- ansible Ubuntu Pro 22.04 LTS 2.10.7+merged+base+2.10.8+dfsg-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2021-3583
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- ansible ansible automation platform 2.0 2.9.23-1.el8ap
- ansible ansible engine 2.9, ansible engine 2 2.9.23-1.el7ae
- ansible ansible engine 2.9, ansible engine 2 2.9.23-1.el8ae
- ansible-test ansible engine 2.9, ansible engine 2 2.9.23-1.el7ae
- ansible-test ansible engine 2.9, ansible engine 2 2.9.23-1.el8ae
red hat advisories RHBA-2021:2703RHSA-2021:2663RHSA-2021:2664
- rhnlib Manager Client Tools 15-BETA 5.0.1-159000.6.30.1
- ansible Manager Client Tools 15-BETA 2.9.27-159000.3.9.1
- grafana Manager Client Tools 15-BETA 9.5.8-159000.4.24.1
- mgr-push Manager Client Tools 15-BETA 5.0.1-159000.4.21.1
- spacecmd Manager Client Tools 15-BETA 5.0.1-159000.6.42.1
- python-hwdata Manager Client Tools 15-BETA 2.3.5-159000.5.13.1
- python-pyvmomi Manager Client Tools 15-BETA 6.7.3-159000.3.6.1
- dracut-saltboot Manager Client Tools Beta for SLE Micro 5, Manager Client Tools 15-BETA 0.1.1681904360.84ef141-159000.3.30.1
suse advisories SUSE-SU-2024:0196-1SUSE-SU-2022:3178-1SUSE-SU-2021:4152-1
- ansible-14 openSUSE Tumbleweed 14.6.0-1.1
- ansible-13 openSUSE Tumbleweed 13.7.0-1.1
- ansible-12 openSUSE Tumbleweed 12.2.0-1.1
- ansible-11 openSUSE Tumbleweed 11.11.0-1.1
- ansible-10 openSUSE Tumbleweed 10.6.0-1.1
- ansible-9 openSUSE Tumbleweed 9.8.0-1.1
opensuse advisories openSUSE-SU-2026:12447-1openSUSE-SU-2026:10944-1openSUSE-SU-2025:15753-1openSUSE-SU-2025:15605-1openSUSE-SU-2024:14536-1openSUSE-SU-2024:14244-1
- ansible CBL-Mariner 2.0 2.12.1-1
azure linux advisories AZL-6305
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- ansible-core Arch Linux 2.11.3-1
arch linux advisories AVG-2260
- github.com/ansible/ansible@03aff64 commit
- github.com/ansible/ansible@8aa850e commit
- github.com/ansible/ansible@8b17e5b commit
- github.com/ansible/ansible#74960 pull request
Is CVE-2021-3583 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-3583 updated cvss 6.6
ansible: Template Injection through yaml multi-line strings with ansible facts used in template.
-
Red Hat Ansible Tower 3 ansibleaffected: no fix available
-
Red Hat Ansible Automation Platform 2.0 for RHEL 8 ansible 2.9.23-1.el8apfixed: vendor fix RHBA-2021:2703
-
Red Hat Ansible Engine 2 for RHEL 7 ansible 2.9.23-1.el7ae, ansible-test 2.9.23-1.el7ae Red Hat Ansible Engine 2 for RHEL 8 ansible 2.9.23-1.el8ae, ansible-test 2.9.23-1.el8aefixed: vendor fix RHSA-2021:2664
-
Red Hat Ansible Engine 2.9 for RHEL 7 Server ansible 2.9.23-1.el7ae, ansible-test 2.9.23-1.el7ae Red Hat Ansible Engine 2.9 for RHEL 8 ansible 2.9.23-1.el8ae, ansible-test 2.9.23-1.el8aefixed: vendor fix RHSA-2021:2663
-
Red Hat Ansible Automation Platform 2.0 for RHEL 8 helm 3.3.4-2.el8at, tini 0.16.1-1.el8at, sshpass 1.06-3.el8ae, receptor 1.0.0-1.el8ap, dumb-init 1.2.5-1.el8ap, python-rq 1.7.0-2.el8pc, +231 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.90% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVD | 2.0 | 3.6 | AV:L/AC:L/Au:N/C:P/I:P/A:N |
| GitHub | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | ansible | <2.9.23rc1 >=2.10.0a1, <2.10.11rc1 >=2.11.0a1, <2.11.2rc1 <2.9.23 |
2.9.23rc1 2.10.11rc1 2.11.2rc1 2.9.23 |
Affected products
- n/a ansible
Classification
References
-
github.com
/ansible/ansible/pull/74960
web
-
github.com
/ansible/ansible/commit/03aff644cc1c00e1f7551195c68fbd0d13a39e6e
web
-
github.com
/ansible/ansible/commit/8aa850e3573e48c9a2f12aef84e8a3a6f5ba4847
web
-
github.com
/ansible/ansible/commit/8b17e5b9229ffaecfe10a4881bc3f87dd2c184e1
web
-
bugzilla.redhat.com
/show_bug.cgi?id=1968412
web, issue-tracking, vendor-advisory, report
-
lists.debian.org
/debian-lts-announce/2023/12/msg00018.html
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2021-3583
advisory
-
github.com
/advisories/GHSA-2pfh-q76x-gwvm
advisory
-
github.com
/ansible/ansible
package
-
github.com
/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2021-358.yaml
web
Sources
- CVE List CVE-2021-3583
- GitHub Advisory GHSA-2pfh-q76x-gwvm
- NVD CVE-2021-3583
- OSV PYSEC-2021-358
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.