{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-4041","id":"CVE-2021-4041","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.","descriptionLong":"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.","published":"2022-08-24T15:11:13.000Z","updated":"2026-10-20T10:54:56.130563424Z","reserved":"2021-12-02T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"redhat","metric":{"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","rating":"high","source":"NVD"},"metrics":[{"version":"4.0","score":null,"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","rating":"high","source":"GitHub"},{"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","rating":"high","source":"NVD"},{"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","rating":"high","source":"OSV"},{"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","rating":"high","source":"GitHub"}],"rating":"high","products":["ansible-runner"],"affectedProducts":[{"vendor":"n/a","product":"ansible-runner","defaultStatus":null,"versions":[{"status":"affected","version":"Fixed in ansible-runner 2.1.0"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"ansible-runner","purl":"pkg:pypi/ansible-runner","ranges":["<2.1.0"],"fixed":["2.1.0"],"advisory":"GHSA-6j58-grhv-2769"}],"cwes":["CWE-20","CWE-116"],"aliases":["GHSA-6j58-grhv-2769","PYSEC-2022-253"],"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"]},{"url":"https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4041","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6j58-grhv-2769","tags":["advisory"]},{"url":"https://github.com/ansible/ansible-runner","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/ansible-runner/PYSEC-2022-253.yaml","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00332,"epssPercentile":0.26822,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-4041","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4041","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-4041","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-6j58-grhv-2769","ok":true,"note":"GHSA-6j58-grhv-2769"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-4041","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}