# CVE-2021-3583: Improper Input Validation and Command Injection in Ansible

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.89%, higher than 60% of CVEs (2026-12-02)
- Published: 2021-09-22T00:00:00.000Z
- Modified: 2026-06-17T04:05:23.190Z
- Also known as: GHSA-2pfh-q76x-gwvm, PYSEC-2021-358
- Weaknesses: CWE-20, CWE-77, CWE-94
- Assigned by: redhat

## Description

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.

(As written by CVE List.)

## Affected

- ansible: ansible_tower 3.7, ansible_engine 2.9.23
- ansible (PyPI): before 2.9.23rc1; from 2.10.0a1 before 2.10.11rc1; from 2.11.0a1 before 2.11.2rc1; before 2.9.23
- redhat ansible_automation_platform: 1.2
- redhat ansible_engine: before 2.9.23
- redhat ansible_tower: before 3.7.0

## Every score

- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:2.0 3.6 Low `AV:L/AC:L/Au:N/C:P/I:P/A:N`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1968412> (issue-tracking, report, vendor-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2023/12/msg00018.html> (mailing-list, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3583> (advisory)
- <https://github.com/ansible/ansible/pull/74960> (web)
- <https://github.com/ansible/ansible/commit/03aff644cc1c00e1f7551195c68fbd0d13a39e6e> (web)
- <https://github.com/ansible/ansible/commit/8aa850e3573e48c9a2f12aef84e8a3a6f5ba4847> (web)
- <https://github.com/ansible/ansible/commit/8b17e5b9229ffaecfe10a4881bc3f87dd2c184e1> (web)
- <https://github.com/advisories/GHSA-2pfh-q76x-gwvm> (advisory)
- <https://github.com/ansible/ansible> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2021-358.yaml> (web)

## Sources

- CVE List: [CVE-2021-3583](https://www.cve.org/CVERecord?id=CVE-2021-3583), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-2pfh-q76x-gwvm](https://github.com/advisories/GHSA-2pfh-q76x-gwvm), CC-BY-4.0, modified 2024-09-06
- NVD: [CVE-2021-3583](https://nvd.nist.gov/vuln/detail/CVE-2021-3583), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-358](https://osv.dev/vulnerability/PYSEC-2021-358), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-3583 · Whole record: https://cve.day/CVE-2021-3583.json · Rebuilt by cve.day 2026-11-25T22:58:04.094Z
