Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. ansible-runner
  4. ›
  5. CVE-2021-4041

CVE-2021-4041: Improper Encoding or Escaping of Output

August 25, 2022 (updated September 1, 2022)

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.

References

  • access.redhat.com/security/cve/CVE-2021-4041
  • bugzilla.redhat.com/show_bug.cgi?id=2028074
  • github.com/advisories/GHSA-6j58-grhv-2769
  • github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd
  • github.com/pypa/advisory-database/tree/main/vulns/ansible-runner/PYSEC-2022-253.yaml
  • nvd.nist.gov/vuln/detail/CVE-2021-4041

Code Behaviors & Features

Detect and mitigate CVE-2021-4041 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.1.0

Fixed versions

  • 2.1.0

Solution

Upgrade to version 2.1.0 or above.

Impact 7.8 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

pypi/ansible-runner/CVE-2021-4041.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:52 +0000.