{"id":"CVE-2020-1733","published":"2020-03-11T18:47:40Z","modified":"2024-08-04T06:46:30Z","title":"A race condition flaw was found in Ansible Engine 2.7.17 and prior, 2.8.9 and prior, 2.9.6 and prior when running a…","vendor":"Red Hat","product":"Ansible","tier":"tail","description":{"text":"A race condition flaw was found in Ansible Engine 2.7.17 and prior, 2.8.9 and prior, 2.9.6 and prior when running a playbook with an unprivileged become user. When Ansible needs to run a module with become user, the temporary directory is created in /var/tmp. This directory is created with \"umask 77 && mkdir -p <dir>\"; this operation does not fail if the directory already exists and is owned by another user. An attacker could take advantage to gain control of the become user as the target directory can be retrieved by iterating '/proc/<pid>/cmdline'.","provenance":"source","from":"CVE.org"},"cvss":{"score":5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00403,"percentile":0.34505,"provenance":"source"},"cwes":[{"id":"CWE-377","name":null}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2020-1733","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ansible/ansible/issues/67791","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/05/msg00005.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://security.gentoo.org/glsa/202006-11","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://www.debian.org/security/2021/dsa-4950","tags":["vendor-advisory","x_refsource_DEBIAN"]}],"priority":{"score":10.4,"factors":[{"name":"EPSS percentile","points":6.9},{"name":"CVSS severity","points":3.5}]},"vendorSlug":"red-hat","affectedVersions":[{"vendor":"Red Hat","product":"Ansible","versions":["2.7.17 and prior","2.8.9 and prior","2.9.6 and prior"]}],"affected":[{"ecosystem":"PyPI","package":"ansible","vulnerableRanges":["<2.7.17",">=2.8.0a1, <2.8.11",">=2.9.0a1, <2.9.7",">=2.8.0, <2.8.8",">=2.9.0, <2.9.6"],"patched":["2.7.17","2.8.11","2.9.7","2.8.8","2.9.6"],"from":["GHSA-g4mq-6fp5-qwcf","PYSEC-2020-5"],"provenance":"source"}],"euvd":{"id":"EUVD-2020-0027","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-red-hat-ansible-cve-2016-8628","parents":[{"from":"CVE-2016-8628","to":"CVE-2020-1733","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/ansible/plugins/action/__init__.py"],"commits":["https://github.com/ansible/ansible/commit/35938b907dfcd1106ca40b794f0db446bdb8cf09","https://github.com/ansible/ansible/commit/80b9a0a25c5f75e84aefc8f2b293fb1933b154f2","https://github.com/ansible/ansible/commit/8251d9f4c2bc82632ab992277fcd30ccbf87aa47"],"basis":"rarely changed file"}]},{"from":"CVE-2018-16859","to":"CVE-2020-1733","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/ansible/plugins/shell/powershell.py"],"commits":["https://github.com/ansible/ansible/commit/0d746b4198abf84290a093b83cf02b4203d73d9f","https://github.com/ansible/ansible/commit/2f8d3fcf41107efafc14d51ab6e14531ca8f8c87","https://github.com/ansible/ansible/commit/80b9a0a25c5f75e84aefc8f2b293fb1933b154f2","https://github.com/ansible/ansible/commit/8251d9f4c2bc82632ab992277fcd30ccbf87aa47"],"basis":"rarely changed file"}]},{"from":"CVE-2019-3828","to":"CVE-2020-1733","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/ansible/plugins/action/__init__.py"],"commits":["https://github.com/ansible/ansible/commit/396a2f74717477d80600450e2b7e45349d7b5110","https://github.com/ansible/ansible/commit/4be3215d2f9f84ca283895879f0c6ce1ed7dd333","https://github.com/ansible/ansible/commit/80b9a0a25c5f75e84aefc8f2b293fb1933b154f2","https://github.com/ansible/ansible/commit/8251d9f4c2bc82632ab992277fcd30ccbf87aa47"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2020-1733","to":"CVE-2020-10744","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"An incomplete fix was found for the fix of the flaw CVE-2020-1733 ansible: insecure temporary directory when running become_user from become directive.","from":"CVE.org","in":"CVE-2020-10744"},{"kind":"same-code","provenance":"machine","files":["lib/ansible/plugins/shell/__init__.py"],"commits":["https://github.com/ansible/ansible/commit/77d0effcc5b2da1ef23e4ba32986a9759c27c10d","https://github.com/ansible/ansible/commit/84afa8e90cd168ff13208c8eae3e533ce7e21e1f","https://github.com/ansible/ansible/commit/80b9a0a25c5f75e84aefc8f2b293fb1933b154f2","https://github.com/ansible/ansible/commit/8251d9f4c2bc82632ab992277fcd30ccbf87aa47"],"basis":"shared function","functions":["mkdtemp"]}]}]}}