ID CVE-2012-2337
Summary sudo 1.6.x and 1.7.x before 1.7.9p1, and 1.8.x before 1.8.4p5, does not properly support configurations that use a netmask syntax, which allows local users to bypass intended command restrictions in opportunistic circumstances by executing a command on a host that has an IPv4 address.
References
Vulnerable Configurations
  • Todd Miller Sudo 1.6
    cpe:2.3:a:todd_miller:sudo:1.6
  • Todd Miller Sudo 1.6.1
    cpe:2.3:a:todd_miller:sudo:1.6.1
  • Todd Miller Sudo 1.6.2
    cpe:2.3:a:todd_miller:sudo:1.6.2
  • Todd Miller Sudo 1.6.2p3
    cpe:2.3:a:todd_miller:sudo:1.6.2p3
  • Todd Miller Sudo 1.6.3
    cpe:2.3:a:todd_miller:sudo:1.6.3
  • Todd Miller Sudo 1.6.3 p7
    cpe:2.3:a:todd_miller:sudo:1.6.3_p7
  • Todd Miller Sudo 1.6.4
    cpe:2.3:a:todd_miller:sudo:1.6.4
  • Todd Miller Sudo 1.6.4p2
    cpe:2.3:a:todd_miller:sudo:1.6.4p2
  • Todd Miller Sudo 1.6.5
    cpe:2.3:a:todd_miller:sudo:1.6.5
  • Todd Miller Sudo 1.6.6
    cpe:2.3:a:todd_miller:sudo:1.6.6
  • Todd Miller Sudo 1.6.7
    cpe:2.3:a:todd_miller:sudo:1.6.7
  • Todd Miller Sudo 1.6.7p5
    cpe:2.3:a:todd_miller:sudo:1.6.7p5
  • Todd Miller Sudo 1.6.8
    cpe:2.3:a:todd_miller:sudo:1.6.8
  • Todd Miller Sudo 1.6.8p12
    cpe:2.3:a:todd_miller:sudo:1.6.8p12
  • Todd Miller Sudo 1.6.9
    cpe:2.3:a:todd_miller:sudo:1.6.9
  • Todd Miller Sudo 1.6.9p20
    cpe:2.3:a:todd_miller:sudo:1.6.9p20
  • Todd Miller Sudo 1.6.9p21
    cpe:2.3:a:todd_miller:sudo:1.6.9p21
  • Todd Miller Sudo 1.6.9p22
    cpe:2.3:a:todd_miller:sudo:1.6.9p22
  • Todd Miller Sudo 1.6.9p23
    cpe:2.3:a:todd_miller:sudo:1.6.9p23
CVSS
Base: 7.2 (as of 21-05-2012 - 10:08)
Impact:
Exploitability:
CWE CWE-264
CAPEC
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Access
VectorComplexityAuthentication
LOCAL LOW NONE
Impact
ConfidentialityIntegrityAvailability
COMPLETE COMPLETE COMPLETE
nessus via4
  • NASL family Mandriva Local Security Checks
    NASL id MANDRIVA_MDVSA-2012-079.NASL
    description A vulnerability has been found and corrected in sudo : A flaw exists in the IP network matching code in sudo versions 1.6.9p3 through 1.8.4p4 that may result in the local host being matched even though it is not actually part of the network described by the IP address and associated netmask listed in the sudoers file or in LDAP. As a result, users authorized to run commands on certain IP networks may be able to run commands on hosts that belong to other networks not explicitly listed in sudoers (CVE-2012-2337 The updated packages have been patched to correct this issue.
    last seen 2019-02-21
    modified 2018-07-19
    plugin id 59221
    published 2012-05-22
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59221
    title Mandriva Linux Security Advisory : sudo (MDVSA-2012:079)
  • NASL family Misc.
    NASL id VMWARE_ESX_VMSA-2013-0007_REMOTE.NASL
    description The remote VMware ESX / ESXi host is missing a security-related patch. It is, therefore, affected by multiple vulnerabilities in the bundled version of sudo : - An unspecified flaw exists in the sudo package related to the Network Matching Mechanism that is triggered when parsing IPv4 netmask hosts. A local attacker can exploit this to execute arbitrary code. (CVE-2012-2337) - An arbitrary file overwrite vulnerability exists in sudo due to a race condition occurs in post-uninstall during the upgrade or removal of sudo packages. A local attacker can exploit this via a symlink attack against the /var/tmp/nsswitch.conf.bak file, allowing the attacker write to a specified file. (CVE-2012-3440)
    last seen 2019-02-21
    modified 2018-11-15
    plugin id 89665
    published 2016-03-04
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=89665
    title VMware ESX sudo Package Multiple Vulnerabilities (VMSA-2013-0007) (remote check)
  • NASL family VMware ESX Local Security Checks
    NASL id VMWARE_VMSA-2013-0007.NASL
    description a. Service Console update for sudo The service console package sudo is updated to version 1.7.2p1-14.el5_8.3 The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2012-2337 and CVE-2012-3440 to the issues addressed in this update.
    last seen 2019-02-21
    modified 2018-08-06
    plugin id 66723
    published 2013-05-31
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=66723
    title VMSA-2013-0007 : VMware ESX third-party update for Service Console package sudo
  • NASL family Scientific Linux Local Security Checks
    NASL id SL_20120716_SUDO_ON_SL5_X.NASL
    description The sudo (superuser do) utility allows system administrators to give certain users the ability to run commands as root. A flaw was found in the way the network matching code in sudo handled multiple IP networks listed in user specification configuration directives. A user, who is authorized to run commands with sudo on specific hosts, could use this flaw to bypass intended restrictions and run those commands on hosts not matched by any of the network specifications. (CVE-2012-2337) All users of sudo are advised to upgrade to this updated package, which contains a backported patch to correct this issue.
    last seen 2019-02-21
    modified 2018-12-31
    plugin id 61363
    published 2012-08-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=61363
    title Scientific Linux Security Update : sudo on SL5.x, SL6.x i386/x86_64
  • NASL family Solaris Local Security Checks
    NASL id SOLARIS11_SUDO_20120717.NASL
    description The remote Solaris system is missing necessary patches to address security updates : - sudo 1.6.x and 1.7.x before 1.7.9p1, and 1.8.x before 1.8.4p5, does not properly support configurations that use a netmask syntax, which allows local users to bypass intended command restrictions in opportunistic circumstances by executing a command on a host that has an IPv4 address. (CVE-2012-2337)
    last seen 2019-02-21
    modified 2018-11-15
    plugin id 80778
    published 2015-01-19
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=80778
    title Oracle Solaris Third-Party Patch Update : sudo (cve_2012_2337_restriction_bypass)
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_B3435B689EE811E1997C002354ED89BC.NASL
    description Todd Miller reports : Sudo supports granting access to commands on a per-host basis. The host specification may be in the form of a host name, a netgroup, an IP address, or an IP network (an IP address with an associated netmask). When IPv6 support was added to sudo, a bug was introduced that caused the IPv6 network matching code to be called when an IPv4 network address does not match. Depending on the value of the uninitialized portion of the IPv6 address, it is possible for the IPv4 network number to match when it should not. This bug only affects IP network matching and does not affect simple IP address matching. The reported configuration that exhibited the bug was an LDAP-based sudo installation where the sudoRole object contained multiple sudoHost entries, each containing a different IPv4 network. File-based sudoers should be affected as well as the same matching code is used.
    last seen 2019-02-21
    modified 2018-11-23
    plugin id 59169
    published 2012-05-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59169
    title FreeBSD : sudo -- netmask vulnerability (b3435b68-9ee8-11e1-997c-002354ed89bc)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SUDO-8134.NASL
    description This update fixes a security problem in sudo : Multiple netmask values used in Host / Host_List configuration caused any host to be allowed access. (CVE-2012-2337) Also a bug in wildcard matching could allow too relaxed matches within subdirectories of the specified path so /usr/bin/* would also match /usr/bin/X11/*, which is probably not intended. The behavior was aligned to the one described in the sudoers manpage
    last seen 2019-02-21
    modified 2012-05-29
    plugin id 59288
    published 2012-05-29
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59288
    title SuSE 10 Security Update : sudo, sudo-debuginfo (ZYPP Patch Number 8134)
  • NASL family CentOS Local Security Checks
    NASL id CENTOS_RHSA-2012-1081.NASL
    description An updated sudo package that fixes one security issue is now available for Red Hat Enterprise Linux 5 and 6. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The sudo (superuser do) utility allows system administrators to give certain users the ability to run commands as root. A flaw was found in the way the network matching code in sudo handled multiple IP networks listed in user specification configuration directives. A user, who is authorized to run commands with sudo on specific hosts, could use this flaw to bypass intended restrictions and run those commands on hosts not matched by any of the network specifications. (CVE-2012-2337) All users of sudo are advised to upgrade to this updated package, which contains a backported patch to correct this issue.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 59981
    published 2012-07-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59981
    title CentOS 5 / 6 : sudo (CESA-2012:1081)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-1442-1.NASL
    description It was discovered that sudo incorrectly handled network masks when using Host and Host_List. A local user who is listed in sudoers may be allowed to run commands on unintended hosts when IPv4 network masks are used to grant access. A local attacker could exploit this to bypass intended access restrictions. Host and Host_List are not used in the default installation of Ubuntu. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 59170
    published 2012-05-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59170
    title Ubuntu 8.04 LTS / 10.04 LTS / 11.04 / 11.10 / 12.04 LTS : sudo vulnerability (USN-1442-1)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_11_SUDO-120517.NASL
    description This update fixes a security problem in sudo : Multiple netmask values used in Host / Host_List configuration caused any host to be allowed access. (CVE-2012-2337) Also a bug in wildcard matching could allow too relaxed matches within subdirectories of the specified path so /usr/bin/* would also match /usr/bin/X11/*, which is probably not intended. The behaviour was aligned to the one described in the sudoers manpage
    last seen 2019-02-21
    modified 2013-10-25
    plugin id 64227
    published 2013-01-25
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=64227
    title SuSE 11.1 Security Update : sudo, sudo-debuginfo, sudo-debugsource (SAT Patch Number 6306)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2012-293.NASL
    description sudo did not always honor the Host_List setting in /etc/sudoers properly
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 74632
    published 2014-06-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=74632
    title openSUSE Security Update : sudo (openSUSE-SU-2012:0652-1)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2012-8021.NASL
    description - fixed CVE-2012-2337 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2015-10-20
    plugin id 59962
    published 2012-07-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59962
    title Fedora 16 : sudo-1.8.3p1-3.fc16 (2012-8021)
  • NASL family Mandriva Local Security Checks
    NASL id MANDRIVA_MDVSA-2013-054.NASL
    description Multiple vulnerabilities has been found and corrected in sudo : A flaw exists in the IP network matching code in sudo versions 1.6.9p3 through 1.8.4p4 that may result in the local host being matched even though it is not actually part of the network described by the IP address and associated netmask listed in the sudoers file or in LDAP. As a result, users authorized to run commands on certain IP networks may be able to run commands on hosts that belong to other networks not explicitly listed in sudoers (CVE-2012-2337). sudo 1.6.0 through 1.7.10p6 and sudo 1.8.0 through 1.8.6p6 allows local users or physically-proximate attackers to bypass intended time restrictions and retain privileges without re-authenticating by setting the system clock and sudo user timestamp to the epoch (CVE-2013-1775). Sudo before 1.8.6p7 allows a malicious user to run commands via sudo without authenticating, so long as there exists a terminal the user has access to where a sudo command was successfully run by that same user within the password timeout period (usually five minutes) (CVE-2013-1776). The updated packages have been patched to correct these issues.
    last seen 2019-02-21
    modified 2018-07-19
    plugin id 66068
    published 2013-04-20
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=66068
    title Mandriva Linux Security Advisory : sudo (MDVSA-2013:054)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-2478.NASL
    description It was discovered that sudo misparsed network masks used in Host and Host_List stanzas. This allowed the execution of commands on hosts, where the user would not be allowed to run the specified command.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 59250
    published 2012-05-24
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59250
    title Debian DSA-2478-1 : sudo - parsing error
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2012-7998.NASL
    description - fixed CVE-2012-2337 - temporarily disabled SSSD support Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2015-10-20
    plugin id 59296
    published 2012-05-30
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59296
    title Fedora 17 : sudo-1.8.3p1-7.fc17 (2012-7998)
  • NASL family Amazon Linux Local Security Checks
    NASL id ALA_ALAS-2012-110.NASL
    description A flaw was found in the way the network matching code in sudo handled multiple IP networks listed in user specification configuration directives. A user, who is authorized to run commands with sudo on specific hosts, could use this flaw to bypass intended restrictions and run those commands on hosts not matched by any of the network specifications. (CVE-2012-2337)
    last seen 2019-02-21
    modified 2018-04-18
    plugin id 69600
    published 2013-09-04
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=69600
    title Amazon Linux AMI : sudo (ALAS-2012-110)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-201207-01.NASL
    description The remote host is affected by the vulnerability described in GLSA-201207-01 (sudo: Privilege escalation) An error in sudo may allow unintended IPv4 hosts to be granted access to commands. Impact : A local attacker could gain escalated privileges. Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2018-07-11
    plugin id 59893
    published 2012-07-10
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59893
    title GLSA-201207-01 : sudo: Privilege escalation
  • NASL family Oracle Linux Local Security Checks
    NASL id ORACLELINUX_ELSA-2012-1081.NASL
    description From Red Hat Security Advisory 2012:1081 : An updated sudo package that fixes one security issue is now available for Red Hat Enterprise Linux 5 and 6. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The sudo (superuser do) utility allows system administrators to give certain users the ability to run commands as root. A flaw was found in the way the network matching code in sudo handled multiple IP networks listed in user specification configuration directives. A user, who is authorized to run commands with sudo on specific hosts, could use this flaw to bypass intended restrictions and run those commands on hosts not matched by any of the network specifications. (CVE-2012-2337) All users of sudo are advised to upgrade to this updated package, which contains a backported patch to correct this issue.
    last seen 2019-02-21
    modified 2018-07-18
    plugin id 68577
    published 2013-07-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=68577
    title Oracle Linux 5 / 6 : sudo (ELSA-2012-1081)
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2012-1081.NASL
    description An updated sudo package that fixes one security issue is now available for Red Hat Enterprise Linux 5 and 6. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The sudo (superuser do) utility allows system administrators to give certain users the ability to run commands as root. A flaw was found in the way the network matching code in sudo handled multiple IP networks listed in user specification configuration directives. A user, who is authorized to run commands with sudo on specific hosts, could use this flaw to bypass intended restrictions and run those commands on hosts not matched by any of the network specifications. (CVE-2012-2337) All users of sudo are advised to upgrade to this updated package, which contains a backported patch to correct this issue.
    last seen 2019-02-21
    modified 2018-11-26
    plugin id 59982
    published 2012-07-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=59982
    title RHEL 5 / 6 : sudo (RHSA-2012:1081)
redhat via4
advisories
bugzilla
id 820677
title CVE-2012-2337 sudo: Multiple netmask values used in Host / Host_List configuration cause any host to be allowed access
oval
OR
  • AND
    • comment Red Hat Enterprise Linux 5 is installed
      oval oval:com.redhat.rhsa:tst:20070055001
    • comment sudo is earlier than 0:1.7.2p1-14.el5_8
      oval oval:com.redhat.rhsa:tst:20121081002
    • comment sudo is signed with Red Hat redhatrelease key
      oval oval:com.redhat.rhsa:tst:20090267003
  • AND
    • comment sudo is earlier than 0:1.7.4p5-12.el6_3
      oval oval:com.redhat.rhsa:tst:20121081008
    • comment sudo is signed with Red Hat redhatrelease2 key
      oval oval:com.redhat.rhsa:tst:20110599006
    • OR
      • comment Red Hat Enterprise Linux 6 Client is installed
        oval oval:com.redhat.rhsa:tst:20100842001
      • comment Red Hat Enterprise Linux 6 Server is installed
        oval oval:com.redhat.rhsa:tst:20100842002
      • comment Red Hat Enterprise Linux 6 Workstation is installed
        oval oval:com.redhat.rhsa:tst:20100842003
      • comment Red Hat Enterprise Linux 6 ComputeNode is installed
        oval oval:com.redhat.rhsa:tst:20100842004
rhsa
id RHSA-2012:1081
released 2012-07-16
severity Moderate
title RHSA-2012:1081: sudo security update (Moderate)
rpms
  • sudo-0:1.7.2p1-14.el5_8
  • sudo-0:1.7.4p5-12.el6_3
refmap via4
confirm
debian DSA-2478
fedora FEDORA-2012-7998
mandriva MDVSA-2012:079
misc https://www.suse.com/security/cve/CVE-2012-2337/
sectrack 1027077
secunia
  • 49219
  • 49244
  • 49291
  • 49948
vmware via4
description The service console package sudo is updated to version 1.7.2p1-14.el5_8.3
id VMSA-2013-0007
last_updated 2013-12-05T00:00:00
published 2013-05-30T00:00:00
title Service Console update for sudo
Last major update 13-08-2012 - 23:37
Published 18-05-2012 - 14:55
Last modified 04-01-2018 - 21:29
Back to Top