CVE-2021-4041: Input Validation

Published Dec 1, 2021
·
Updated

A flaw was found in ansible-runner. An improper escaping of the shell command, while calling the ansiblerunner.interface.runcommand, 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.

Other sources

A flaw was found in ansible-runner. An improper escaping of the shell command, while calling the ansiblerunner.interface.runcommand, 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.

MITRE

An improper escape on the line,could lead to unsuspecting developer execute code on the host machine rather than virtual one https://github.com/ansible/ansible-runner/blob/3d6886d1a26358ead139fef736d1c8ca07f7ab71/ansiblerunner/runner.py#L257

Red Hat

Affected Software

7 affected componentsFixes available
redhat/ansible-runner<2.1.0
2.1.0
pip/ansible-runner<2.1.0
2.1.0
redhat Ansible Runner<2.1.0
redhat Ansible Runner=2.1.0-alpha1
redhat Ansible Runner=2.1.0-alpha2
redhat Ansible Runner=2.1.0-beta1
IBM Edge Application Manager<=4.5

Event History

Aug 24, 2022
CVE Published
via MITRE·03:11 PM
Data Sourced
via MITRE·03:11 PM
DescriptionWeakness
Aug 25, 2022
Advisory Published
via GitHub·12:00 AM
Aug 20, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-4041?

CVE-2021-4041 is classified as a high severity vulnerability due to the potential for executing arbitrary commands in the host shell.

2

How do I fix CVE-2021-4041?

To remediate CVE-2021-4041, upgrade ansible-runner to version 2.1.0 or later.

3

What types of systems are affected by CVE-2021-4041?

CVE-2021-4041 affects systems running versions of ansible-runner prior to 2.1.0, including its alpha and beta releases.

4

What can attackers achieve by exploiting CVE-2021-4041?

Exploiting CVE-2021-4041 allows attackers to execute arbitrary commands on the host system, potentially compromising its integrity.

5

Who is responsible for reporting and addressing CVE-2021-4041?

The vulnerability CVE-2021-4041 was reported and acknowledged by Red Hat, who is responsible for providing the necessary patches.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203