// For flags

CVE-2021-4041

Ansible: Improper shell escaping in ansible-runner

Severity Score

7.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Se ha encontrado un fallo en ansible-runner. Un escape inapropiado del comando shell, mientras es llamado a ansible_runner.interface.run_command, puede conllevar a que los parámetros sean ejecutados como el comando shell del host. Un desarrollador podría escribir involuntariamente código que es ejecutado en el host en lugar de en el entorno virtual.

Red Hat Ansible Automation Platform provides an enterprise framework for building, deploying and managing IT automation at scale. IT Managers can provide top-down guidelines on how automation is applied to individual teams, while automation developers retain the freedom to write tasks that leverage existing knowledge without the overhead. Ansible Automation Platform makes it possible for users across an organization to share, vet, and manage automation content by means of a simple, powerful, and agentless language.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
Complete
Integrity
Complete
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-12-02 CVE Reserved
  • 2022-01-16 CVE Published
  • 2024-08-03 CVE Updated
  • 2025-03-30 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-20: Improper Input Validation
  • CWE-116: Improper Encoding or Escaping of Output
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Redhat
Search vendor "Redhat"
Ansible Runner
Search vendor "Redhat" for product "Ansible Runner"
< 2.1.0
Search vendor "Redhat" for product "Ansible Runner" and version " < 2.1.0"
-
Affected
Redhat
Search vendor "Redhat"
Ansible Runner
Search vendor "Redhat" for product "Ansible Runner"
2.1.0
Search vendor "Redhat" for product "Ansible Runner" and version "2.1.0"
alpha1
Affected
Redhat
Search vendor "Redhat"
Ansible Runner
Search vendor "Redhat" for product "Ansible Runner"
2.1.0
Search vendor "Redhat" for product "Ansible Runner" and version "2.1.0"
alpha2
Affected
Redhat
Search vendor "Redhat"
Ansible Runner
Search vendor "Redhat" for product "Ansible Runner"
2.1.0
Search vendor "Redhat" for product "Ansible Runner" and version "2.1.0"
beta1
Affected