CVE-2021-4041
HIGH 7.8CVSS 3.1ansible-runner vulnerable to shell command injection
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.
- Published
- 24 Aug 2022
- Last modified
- 17 Jun 2026
- Assigned by
- secalert@redhat.com
- NVD status
- Modified
- Weakness
- CWE-116CWE-20
- Also known as
- GHSA-6j58-grhv-2769PYSEC-2022-253
- Sources
- NVDJSONOSV GHSA-6j58-grhv-2769JSONOSV PYSEC-2022-253JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | redhat | ansible_runnercpe:2.3:a:redhat:ansible_runner:*:*:*:*:*:*:*:* |
< 2.1.0 | 2.1.0 |
| NVD | redhat | ansible_runnercpe:2.3:a:redhat:ansible_runner:2.1.0:alpha1:*:*:*:*:*:* |
= 2.1.0 | |
| NVD | redhat | ansible_runnercpe:2.3:a:redhat:ansible_runner:2.1.0:alpha2:*:*:*:*:*:* |
= 2.1.0 | |
| NVD | redhat | ansible_runnercpe:2.3:a:redhat:ansible_runner:2.1.0:beta1:*:*:*:*:*:* |
= 2.1.0 | |
| OSV | PyPI | ansible-runner | < 2.1.0 | 2.1.0 |
References
- https://access.redhat.com/security/cve/CVE-2021-4041 · Vendor Advisory, WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2028074 · Issue Tracking, Patch, Vendor Advisory, WEB, REPORT
- https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd · Patch, Third Party Advisory, WEB, FIX
- https://nvd.nist.gov/vuln/detail/CVE-2021-4041 · ADVISORY
- https://github.com/advisories/GHSA-6j58-grhv-2769 · ADVISORY
- https://github.com/ansible/ansible-runner · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/ansible-runner/PYSEC-2022-253.yaml · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 24 Aug 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 24 Aug 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Aug 2022)