{"id":"CVE-2021-4041","aliases":["DEBIAN-CVE-2021-4041","EUVD-2022-0003","GHSA-6j58-grhv-2769","PYSEC-2022-253","RHSA-2022:0108","UBUNTU-CVE-2021-4041"],"status":"published","title":"ansible-runner vulnerable to shell command injection","description":"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.","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.00332,"percentile":0.26703,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-116","CWE-20"],"published":"2022-08-24T15:11:13Z","modified":"2026-10-23T18:02:30Z","fixes":[{"ecosystem":"PyPI","package":"ansible-runner","fixed_in":["2.1.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"ansible-runner","fixed_in":["2.1.1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"ansible-runner","fixed_in":["2.1.1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"ansible-runner","fixed_in":["2.1.1-1"],"sources":["osv"]},{"ecosystem":"Red Hat:ansible_automation_platform:2.0::el8","package":"ansible-runner","fixed_in":["0:2.0.3-2.el8ap"],"sources":["osv"]},{"ecosystem":"Red Hat:ansible_automation_platform:2.0::el8","package":"python38-ansible-runner","fixed_in":["0:2.0.3-2.el8ap"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"ansible-runner","fixed_in":["2.1.1-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.0"}]}],"versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.1.0","1.1.1","1.1.2","1.2.0","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.4.0","1.4.1","1.4.2","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","1.4.9","2.0.0","2.0.0.0a5","2.0.0.0b1","2.0.0.0rc1","2.0.0.0rc2","2.0.0.0rc3","2.0.0a1","2.0.0a2","2.0.0a3","2.0.0a4","2.0.1","2.0.2","2.0.3","2.0.4","2.1.0.0a1","2.1.0.0a2","2.1.0.0b1"]},{"source":"osv","ecosystem":"PyPI","package":"ansible-runner","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"3533f265f4349a3f2a0283158cd01b59a6bbc7bd"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.0"}]}],"versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.1.0","1.1.1","1.1.2","1.2.0","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.4.0","1.4.1","1.4.2","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","1.4.9","2.0.0","2.0.0.0a5","2.0.0.0b1","2.0.0.0rc1","2.0.0.0rc2","2.0.0.0rc3","2.0.0a1","2.0.0a2","2.0.0a3","2.0.0a4","2.0.1","2.0.2","2.0.3","2.0.4","2.1.0.0a1","2.1.0.0a2","2.1.0.0b1"]},{"source":"osv","ecosystem":"Red Hat:ansible_automation_platform:2.0::el8","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:2.0.3-2.el8ap"}]}]},{"source":"osv","ecosystem":"Red Hat:ansible_automation_platform:2.0::el8","package":"python38-ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:2.0.3-2.el8ap"}]}]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ansible-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1-1"}]}],"versions":["1.4.6-1","1.4.6-1.1"]}],"products":[{"vendor":"redhat","product":"ansible_runner"}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2028074","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Vendor Advisory","fix","web","report"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-4041","tags":["x_refsource_MISC","x_transferred","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","article"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4041","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/ansible-runner/PYSEC-2022-253.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6j58-grhv-2769","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-4041","tags":["advisory"]},{"url":"https://github.com/ansible/ansible-runner","tags":["package"]},{"url":"https://access.redhat.com/errata/RHSA-2022:0108","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","tags":["article"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_0108.json","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-4041","tags":["advisory","report"]},{"url":"https://ubuntu.com/security/CVE-2021-4041","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-4041","description":"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.","status":"published","published":"2022-08-24T15:11:13Z","modified":"2024-08-03T17:16:03.408Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:33:07.697752Z"}],"euvd":[{"id":"EUVD-2022-0003","description":"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.","status":"published","published":"2022-08-24T15:11:13Z","modified":"2024-08-03T17:16:03Z","updated_at":"2026-11-03T03:25:10.888157Z"}],"ghsa":[{"id":"GHSA-6j58-grhv-2769","title":"ansible-runner vulnerable to shell command injection","description":"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.","status":"published","published":"2022-08-25T00:00:27Z","modified":"2024-09-03T21:16:20Z","cvss":[{"version":"4.0","score":8.5,"vector":"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","level":"high"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-20","CWE-116"],"updated_at":"2026-11-02T14:38:00.257632Z"}],"nvd":[{"id":"CVE-2021-4041","description":"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.","status":"published","published":"2022-08-24T16:15:09.37Z","modified":"2026-06-17T04:18:56.453Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-20","CWE-116"],"updated_at":"2026-11-02T14:07:06.906968Z"}],"osv":[{"id":"CVE-2021-4041","description":"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.","status":"published","published":"2022-08-24T16:15:09.37Z","modified":"2026-10-20T10:54:56.130563424Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-4041","description":"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.","status":"published","published":"2022-08-24T16:15:09.37Z","modified":"2026-10-23T18:02:30.4090709Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"GHSA-6j58-grhv-2769","title":"ansible-runner vulnerable to shell command injection","description":"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.","status":"published","published":"2022-08-25T00:00:27Z","modified":"2024-09-03T21:37:16.179658Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":8.5,"vector":"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","level":"high"}],"cwes":["CWE-116","CWE-20"],"updated_at":"2026-11-02T15:46:39.965326Z"},{"id":"RHSA-2022:0108","title":"Red Hat Security Advisory: ansible-runner security and bug fix update","status":"published","published":"2024-09-16T07:00:34Z","modified":"2025-11-22T12:29:00Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:09.077222Z"},{"id":"UBUNTU-CVE-2021-4041","description":"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.","status":"published","published":"2022-08-24T16:15:00Z","modified":"2025-09-08T16:46:50Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"PYSEC-2022-253","description":"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.","status":"published","published":"2022-08-24T16:15:00Z","modified":"2023-11-08T04:06:47.591366Z","updated_at":"2026-11-02T15:52:53.449407Z"}]}}
