What’s Vulnerable › Vulnerabilities
CVE-2021-4041
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-08-24 · updated 2026-06-17
- Weakness: CWE-20
Description
A flaw was found in ansible-runner. An improper escaping of the shell command, while calling the ansible_runner.interface.run_command, can lead to parameters getting executed as host's shell command. A developer could unintentionally write code that gets executed in the host rather than the virtual environment.
Affected products
- ansible-runner: before 2.1.0; 2.1.0-alpha1, 2.1.0-alpha2, 2.1.0-beta1 — fixed in 2.1.0
How to fix
Upgrade to a fixed version: ansible-runner 2.1.0. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/security/cve/CVE-2021-4041
- https://bugzilla.redhat.com/show_bug.cgi?id=2028074
- https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd
- https://access.redhat.com/security/cve/CVE-2021-4041
- https://bugzilla.redhat.com/show_bug.cgi?id=2028074
- https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd
Get alerted when CVE-2021-4041 or the next vulnerability affects your stack