CVE-2021-4041
Python vulnerability analysis and mitigation

Overview

A flaw was found in ansible-runner where an improper escaping of the shell command while calling the ansiblerunner.interface.runcommand could lead to parameters getting executed as host's shell command. This vulnerability, identified as CVE-2021-4041, affects ansible-runner versions prior to 2.1.0, where a developer could unintentionally write code that gets executed in the host rather than the virtual environment (NVD, Red Hat).

Technical details

The vulnerability stems from improper shell escaping in the ansible-runner component. The issue has been assigned a CVSS v3.1 base score of 7.8 (HIGH) with the vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. The vulnerability is categorized under CWE-116 (Improper Encoding or Escaping of Output) and CWE-20 (Improper Input Validation) (NVD).

Impact

The vulnerability could allow an attacker to execute commands on the host system rather than within the intended virtual environment. This poses a significant security risk as it could lead to unauthorized command execution and potential system compromise (Red Hat).

Mitigation and workarounds

The vulnerability has been fixed in ansible-runner version 2.1.0. The fix involves removing shell use in subprocess calls and implementing proper parameter handling. Users are advised to upgrade to version 2.1.0 or later to address this security issue (Bugzilla, GitHub).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management