CVE-2020-1733: Race Condition

Published Feb 11, 2020
·
Updated

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'.

Other sources

A race condition flaw was found in Ansible Engine 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'.

When a playbook runs a target on a Linux node with an unprivileged become user, a raced condition allows another user on the node to gain control of the become user. In addition, permissions of files owned by the original ssh user on the node can be modified.

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.

Red Hat

Affected Software

26 affected componentsFixes available
redhat/ansible<0:2.7.17-1.el7ae
0:2.7.17-1.el7ae
redhat/ansible<0:2.8.11-1.el7ae
0:2.8.11-1.el7ae
redhat/ansible<0:2.8.11-1.el8ae
0:2.8.11-1.el8ae
redhat/ansible<0:2.9.7-1.el7ae
0:2.9.7-1.el7ae
redhat/ansible<0:2.9.7-1.el8ae
0:2.9.7-1.el8ae
debian/ansible
2.7.7+dfsg-1+deb10u12.7.7+dfsg-1+deb10u22.10.7+merged+base+2.10.8+dfsg-17.3.0+dfsg-17.7.0+dfsg-3
redhat/ansible-engine<2.7.17
2.7.17
redhat/ansible-engine<2.8.11
2.8.11
redhat/ansible-engine<2.9.7
2.9.7
pip/ansible>=2.9.0a1<2.9.7
2.9.7
pip/ansible>=2.8.0a1<2.8.11
2.8.11
pip/ansible>=0<2.7.17
2.7.17
redhat ansible<=2.7.16
redhat ansible>=2.8.0<2.8.8
redhat ansible>=2.9.0<=2.9.5
redhat Ansible Tower<=3.3.4
redhat Ansible Tower>=3.3.5<=3.4.5
redhat Ansible Tower>=3.5.0<=3.5.5
redhat Ansible Tower>=3.6.0<=3.6.3
redhat CloudForms Management Engine=5.0
redhat Openstack=13
Fedoraproject Fedora=30
Fedoraproject Fedora=31
Fedoraproject Fedora=32
Debian Debian Linux=8.0
Debian Debian Linux=10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/ansible to a version that resolves this vulnerability.

    Fixed in 0:2.7.17-1.el7ae
  2. Upgrade

    Upgrade redhat/ansible to a version that resolves this vulnerability.

    Fixed in 0:2.8.11-1.el7ae
  3. Upgrade

    Upgrade redhat/ansible to a version that resolves this vulnerability.

    Fixed in 0:2.8.11-1.el8ae
  4. Upgrade

    Upgrade redhat/ansible to a version that resolves this vulnerability.

    Fixed in 0:2.9.7-1.el7ae
  5. Upgrade

    Upgrade redhat/ansible to a version that resolves this vulnerability.

    Fixed in 0:2.9.7-1.el8ae
  6. Upgrade

    Upgrade debian/ansible to a version that resolves this vulnerability.

    Fixed in 2.7.7+dfsg-1+deb10u1Fixed in 2.7.7+dfsg-1+deb10u2Fixed in 2.10.7+merged+base+2.10.8+dfsg-1Fixed in 7.3.0+dfsg-1Fixed in 7.7.0+dfsg-3
  7. Upgrade

    Upgrade redhat/ansible-engine to a version that resolves this vulnerability.

    Fixed in 2.7.17
  8. Upgrade

    Upgrade redhat/ansible-engine to a version that resolves this vulnerability.

    Fixed in 2.8.11
  9. Upgrade

    Upgrade redhat/ansible-engine to a version that resolves this vulnerability.

    Fixed in 2.9.7
  10. Upgrade

    Upgrade pip/ansible to a version that resolves this vulnerability.

    Fixed in 2.9.7
  11. Upgrade

    Upgrade pip/ansible to a version that resolves this vulnerability.

    Fixed in 2.8.11
  12. Upgrade

    Upgrade pip/ansible to a version that resolves this vulnerability.

    Fixed in 2.7.17
  13. Upgrade

    Upgrade Ansible Engine to a version that resolves this vulnerability.

    Fixed in 2.9.7
  14. Compensating control

    Mitigate the become-user race condition by mounting the proc filesystem with the hidepid=2 option (procfs hidepid=2 restricts access to /proc/$PID and limits which users can retrieve target directory data).

  15. Compensating control

    If using the hidepid=2 mitigation on unpatched kernels, be prepared to re-mount procfs after patching or other changes due to the kernel bug described in the material (may require re-mounting for hidepid=2 to take effect).

Event History

Feb 18, 2020
CVE Published
12:00 AM
Mar 11, 2020
CVE Published
via MITRE·06:47 PM
Data Sourced
via MITRE·06:47 PM
DescriptionSeverityWeakness
Apr 20, 2021
Advisory Published
via GitHub·04:46 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2020-1733?

CVE-2020-1733 is a race condition vulnerability found in Ansible Engine when running a playbook with an unprivileged become user.

2

What is the severity of CVE-2020-1733?

CVE-2020-1733 has a medium severity rating.

3

Which versions of Ansible Engine are affected by CVE-2020-1733?

Ansible Engine 2.7.17 and prior, 2.8.9 and prior, and 2.9.6 and prior are affected by CVE-2020-1733.

4

How can I fix CVE-2020-1733?

To fix CVE-2020-1733, update Ansible Engine to versions 2.7.17, 2.8.11, or 2.9.7.

5

Where can I find more information about CVE-2020-1733?

You can find more information about CVE-2020-1733 on the Red Hat Bugzilla and GitHub pages.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203