{"answers":{"affected":"7 open source packages ship an affected version, including ansible. It affects 3 products.","exploited":"There is no known exploitation of CVE-2021-3583 in the wild and no public exploit code.","fix":"Upgrade ansible to a fixed version for your release line: 2.9.23, 2.9.23rc1, 2.10.11rc1 or 2.11.2rc1.","what":"CVE-2021-3583 is a high-severity code injection vulnerability in Redhat Ansible Tower, published on 22 Sep 2021. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-3583 and fix it if it is affected.\n\nWhat it is: CVE-2021-3583 is a high-severity code injection vulnerability in Redhat Ansible Tower, published on 22 Sep 2021. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-3583 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ansible (PyPI): affected all versions; fixed in 2.9.23\n- ansible (PyPI): affected all versions; fixed in 2.9.23rc1\n- ansible (PyPI): affected all versions; fixed in 2.9.23rc1\n- ansible (PyPI): affected from 2.10.0a1; fixed in 2.10.11rc1\n- ansible (PyPI): affected from 2.10.0a1; fixed in 2.10.11rc1\n- ansible (PyPI): affected from 2.11.0a1; fixed in 2.11.2rc1\n- ansible (PyPI): affected from 2.11.0a1; fixed in 2.11.2rc1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-3583/ (Markdown: https://insights.sbomify.com/CVE-2021-3583/index.md)","id":"CVE-2021-3583","markdown":"https://insights.sbomify.com/CVE-2021-3583/index.md","name":"CVE-2021-3583","record":{"aliases":["AZL-6305","CLSA-2025-1748451788","DEBIAN-CVE-2021-3583","GHSA-2pfh-q76x-gwvm","OESA-2025-1647","PYSEC-2021-358","RHBA-2021:2703","RHSA-2021:2663","RHSA-2021:2664","UBUNTU-CVE-2021-3583"],"analysis":{"component_type":"developer_tool","fix_type":"patch","impacts":["code_execution","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Ansible automation tool","requires_auth":"low_privilege","summary":"Attackers can exploit template injection in Ansible to execute commands and disclose sensitive information via crafted facts.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"ansible_automation_platform","vendor":"redhat"},{"product":"ansible_engine","vendor":"redhat"},{"product":"ansible_tower","vendor":"redhat"}],"cvss":{"score":7.1,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-20","name":"Improper Input Validation"}],"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.","ecosystems":["PyPI","Red Hat:ansible_automation_platform:2.0::el8","Red Hat:ansible_engine:2.9::el7","Red Hat:ansible_engine:2.9::el8","Red Hat:ansible_engine:2::el7","Red Hat:ansible_engine:2::el8"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Improper Input Validation and Command Injection in Ansible","id":"CVE-2021-3583","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":"redhat:ansible_tower","products":["redhat:ansible_tower"],"type":"code_injection","year":"2021"},"n_packages":16,"n_references":2,"next":{"headline":"Command injection in foreman","id":"CVE-2021-3584"},"packages":[{"ecosystem":"PyPI","fixed":["2.9.23"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:pypi/ansible","source":"PYSEC-2021-358"},{"ecosystem":"PyPI","fixed":["2.9.23rc1"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":null,"source":"GHSA-2pfh-q76x-gwvm"},{"ecosystem":"PyPI","fixed":["2.9.23rc1"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:pypi/ansible","source":"GHSA-2pfh-q76x-gwvm"},{"ecosystem":"PyPI","fixed":["2.10.11rc1"],"introduced":["2.10.0a1"],"last_affected":[],"package":"ansible","purl":null,"source":"GHSA-2pfh-q76x-gwvm"},{"ecosystem":"PyPI","fixed":["2.10.11rc1"],"introduced":["2.10.0a1"],"last_affected":[],"package":"ansible","purl":"pkg:pypi/ansible","source":"GHSA-2pfh-q76x-gwvm"},{"ecosystem":"PyPI","fixed":["2.11.2rc1"],"introduced":["2.11.0a1"],"last_affected":[],"package":"ansible","purl":null,"source":"GHSA-2pfh-q76x-gwvm"},{"ecosystem":"PyPI","fixed":["2.11.2rc1"],"introduced":["2.11.0a1"],"last_affected":[],"package":"ansible","purl":"pkg:pypi/ansible","source":"GHSA-2pfh-q76x-gwvm"},{"ecosystem":"Red Hat:ansible_automation_platform:2.0::el8","fixed":["0:2.9.23-1.el8ap"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:rpm/redhat/ansible","source":"RHBA-2021:2703"},{"ecosystem":"Red Hat:ansible_engine:2.9::el7","fixed":["0:2.9.23-1.el7ae"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:rpm/redhat/ansible","source":"RHSA-2021:2663"},{"ecosystem":"Red Hat:ansible_engine:2.9::el7","fixed":["0:2.9.23-1.el7ae"],"introduced":["0"],"last_affected":[],"package":"ansible-test","purl":"pkg:rpm/redhat/ansible-test","source":"RHSA-2021:2663"},{"ecosystem":"Red Hat:ansible_engine:2.9::el8","fixed":["0:2.9.23-1.el8ae"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:rpm/redhat/ansible","source":"RHSA-2021:2663"},{"ecosystem":"Red Hat:ansible_engine:2.9::el8","fixed":["0:2.9.23-1.el8ae"],"introduced":["0"],"last_affected":[],"package":"ansible-test","purl":"pkg:rpm/redhat/ansible-test","source":"RHSA-2021:2663"},{"ecosystem":"Red Hat:ansible_engine:2::el7","fixed":["0:2.9.23-1.el7ae"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:rpm/redhat/ansible","source":"RHSA-2021:2664"},{"ecosystem":"Red Hat:ansible_engine:2::el7","fixed":["0:2.9.23-1.el7ae"],"introduced":["0"],"last_affected":[],"package":"ansible-test","purl":"pkg:rpm/redhat/ansible-test","source":"RHSA-2021:2664"},{"ecosystem":"Red Hat:ansible_engine:2::el8","fixed":["0:2.9.23-1.el8ae"],"introduced":["0"],"last_affected":[],"package":"ansible","purl":"pkg:rpm/redhat/ansible","source":"RHSA-2021:2664"},{"ecosystem":"Red Hat:ansible_engine:2::el8","fixed":["0:2.9.23-1.el8ae"],"introduced":["0"],"last_affected":[],"package":"ansible-test","purl":"pkg:rpm/redhat/ansible-test","source":"RHSA-2021:2664"}],"prev":{"headline":"Denial of service in QEMU","id":"CVE-2021-3582"},"products":["ansible"],"published":"2021-09-22","related":[{"cvss_score":8.8,"headline":"Privilege escalation in ansible-tower","id":"CVE-2021-4112","kev_date_added":null,"published":"2022-08-25"},{"cvss_score":7.3,"headline":"Platform: ec2_key module prints out the private key directly to the standard output","id":"CVE-2023-4237","kev_date_added":null,"published":"2023-10-04"},{"cvss_score":6.7,"headline":"Event-driven-ansible: event stream test mode exposes sensitive headers in aap eda","id":"CVE-2025-9907","kev_date_added":null,"published":"2026-02-27"},{"cvss_score":6.7,"headline":"Event-driven-ansible: sensitive internal headers disclosure in aap eda event streams","id":"CVE-2025-9908","kev_date_added":null,"published":"2026-02-27"},{"cvss_score":6.7,"headline":"Aap-gateway: improper path validation in gateway allows credential exfiltration","id":"CVE-2025-9909","kev_date_added":null,"published":"2026-02-27"},{"cvss_score":6.5,"headline":"Privilege escalation in Red Hat Ansible Automation Platform","id":"CVE-2022-2568","kev_date_added":null,"published":"2022-08-18"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHBA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"Attackers can exploit template injection in Ansible to execute commands and disclose sensitive information via crafted facts.","url":"https://insights.sbomify.com/CVE-2021-3583/"}