ID CVE-2013-4559
Summary lighttpd before 1.4.33 does not check the return value of the (1) setuid, (2) setgid, or (3) setgroups functions, which might cause lighttpd to run as root if it is restarted and allows remote attackers to gain privileges, as demonstrated by multiple calls to the clone function that cause setuid to fail when the user process limit is reached.
References
Vulnerable Configurations
  • lighttpd 1.4.9
    cpe:2.3:a:lighttpd:lighttpd:1.4.9
  • lighttpd 1.4.8
    cpe:2.3:a:lighttpd:lighttpd:1.4.8
  • lighttpd 1.4.7
    cpe:2.3:a:lighttpd:lighttpd:1.4.7
  • lighttpd 1.4.6
    cpe:2.3:a:lighttpd:lighttpd:1.4.6
  • lighttpd 1.4.5
    cpe:2.3:a:lighttpd:lighttpd:1.4.5
  • lighttpd 1.4.4
    cpe:2.3:a:lighttpd:lighttpd:1.4.4
  • lighttpd 1.4.32
    cpe:2.3:a:lighttpd:lighttpd:1.4.32
  • lighttpd 1.4.31
    cpe:2.3:a:lighttpd:lighttpd:1.4.31
  • lighttpd 1.4.30
    cpe:2.3:a:lighttpd:lighttpd:1.4.30
  • lighttpd 1.4.3
    cpe:2.3:a:lighttpd:lighttpd:1.4.3
  • lighttpd 1.4.29
    cpe:2.3:a:lighttpd:lighttpd:1.4.29
  • lighttpd 1.4.28
    cpe:2.3:a:lighttpd:lighttpd:1.4.28
  • Lighttpd 1.4.27
    cpe:2.3:a:lighttpd:lighttpd:1.4.27
  • lighttpd lighttpd 1.4.26
    cpe:2.3:a:lighttpd:lighttpd:1.4.26
  • lighttpd lighttpd 1.4.25
    cpe:2.3:a:lighttpd:lighttpd:1.4.25
  • lighttpd lighttpd 1.4.24
    cpe:2.3:a:lighttpd:lighttpd:1.4.24
  • lighttpd lighttpd 1.4.23
    cpe:2.3:a:lighttpd:lighttpd:1.4.23
  • lighttpd lighttpd 1.4.22
    cpe:2.3:a:lighttpd:lighttpd:1.4.22
  • lighttpd lighttpd 1.4.21
    cpe:2.3:a:lighttpd:lighttpd:1.4.21
  • lighttpd lighttpd 1.4.20
    cpe:2.3:a:lighttpd:lighttpd:1.4.20
  • lighttpd lighttpd 1.4.19
    cpe:2.3:a:lighttpd:lighttpd:1.4.19
  • lighttpd 1.4.18
    cpe:2.3:a:lighttpd:lighttpd:1.4.18
  • lighttpd lighttpd 1.4.17
    cpe:2.3:a:lighttpd:lighttpd:1.4.17
  • lighttpd 1.4.16
    cpe:2.3:a:lighttpd:lighttpd:1.4.16
  • lighttpd 1.4.15
    cpe:2.3:a:lighttpd:lighttpd:1.4.15
  • lighttpd lighttpd 1.4.14
    cpe:2.3:a:lighttpd:lighttpd:1.4.14
  • lighttpd 1.4.13
    cpe:2.3:a:lighttpd:lighttpd:1.4.13
  • lighttpd 1.4.12
    cpe:2.3:a:lighttpd:lighttpd:1.4.12
  • lighttpd 1.4.11
    cpe:2.3:a:lighttpd:lighttpd:1.4.11
  • lighttpd 1.4.10
    cpe:2.3:a:lighttpd:lighttpd:1.4.10
  • Debian Linux 7.0
    cpe:2.3:o:debian:debian_linux:7.0
  • Debian Linux 7.1
    cpe:2.3:o:debian:debian_linux:7.1
  • Debian GNU/Linux 6.0
    cpe:2.3:o:debian:debian_linux:6.0
CVSS
Base: 7.6 (as of 20-11-2013 - 10:58)
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
NETWORK HIGH NONE
Impact
ConfidentialityIntegrityAvailability
COMPLETE COMPLETE COMPLETE
nessus via4
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_90B27045953011E39D09000C2980A9F3.NASL
    description lighttpd security advisories report : It is possible to inadvertantly enable vulnerable ciphers when using ssl.cipher-list. In certain cases setuid() and similar can fail, potentially triggering lighttpd to restart running as root. If FAMMonitorDirectory fails, the memory intended to store the context is released; some lines below the 'version' compoment of that context is read. Reading invalid data doesn't matter, but the memory access could trigger a segfault.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 72494
    published 2014-02-14
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=72494
    title FreeBSD : lighttpd -- multiple vulnerabilities (90b27045-9530-11e3-9d09-000c2980a9f3)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2014-2495.NASL
    description Enable building with PIE Latest upstream, multiple security fixes. http://www.lighttpd.net/2014/1/20/1-4-34/ Latest upstream, multiple security fixes. http://www.lighttpd.net/2014/1/20/1-4-34/ 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 2018-12-05
    plugin id 72651
    published 2014-02-24
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=72651
    title Fedora 20 : lighttpd-1.4.34-3.fc20 (2014-2495)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2014-2506.NASL
    description Enable building with PIE Latest upstream, multiple security fixes. http://www.lighttpd.net/2014/1/20/1-4-34/ Latest upstream, multiple security fixes. http://www.lighttpd.net/2014/1/20/1-4-34/ 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 2018-12-05
    plugin id 72652
    published 2014-02-24
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=72652
    title Fedora 19 : lighttpd-1.4.34-3.fc19 (2014-2506)
  • NASL family Web Servers
    NASL id LIGHTTPD_1_4_34.NASL
    description According to its banner, the version of lighttpd running on the remote host is prior to 1.4.34. It is, therefore, affected by the following vulnerabilities : - When Server Name Indication (SNI) is enabled, a flaw exists that could cause the application to use all available SSL ciphers, including weak ciphers. Remote attackers could potentially hijack sessions or obtain sensitive information by sniffing the network. Note only versions 1.4.24 to 1.4.33 are affected. (CVE-2013-4508) - A flaw exists in the clang static analyzer because it fails to perform checks around setuid (1), setgid (2), and setgroups (3) calls. This could allow a remote attacker to gain elevated privileges. (CVE-2013-4559) - A use-after-free error exists in the clang static analyzer, when the FAM stat cache engine is enabled. This could allow remote attackers to dereference already freed memory and crash the program. (CVE-2013-4560) Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.
    last seen 2019-02-21
    modified 2018-07-13
    plugin id 72815
    published 2014-03-05
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=72815
    title lighttpd < 1.4.34 Multiple Vulnerabilities
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2014-43.NASL
    description - added cve-2013-4508.patch and cve-2013-4508-regression-bug729480.patch: (bnc#849059) When defining an ssl.cipher-list, it works for the 'default' HTTPS setup ($SERVER['socket'] 443 block), but when you utilize SNI ($HTTP['host'] blocks within the $SERVER['socket'] block) the ssl.cipher-list seems to not inherit into the host blocks and instead will default to include all of the available openssl ciphers (except SSL v2/v3 based if those are disabled) - added cve-2013-4559.patch (bnc#850468) check success of setuid,setgid,setgroups - added cve-2013-4560.patch (bnc#850469) FAM: fix use after free - added cve-2013-4508.patch and cve-2013-4508-regression-bug729480.patch: (bnc#849059) When defining an ssl.cipher-list, it works for the 'default' HTTPS setup ($SERVER['socket'] 443 block), but when you utilize SNI ($HTTP['host'] blocks within the $SERVER['socket'] block) the ssl.cipher-list seems to not inherit into the host blocks and instead will default to include all of the available openssl ciphers (except SSL v2/v3 based if those are disabled) - added cve-2013-4559.patch (bnc#850468) check success of setuid,setgid,setgroups - added cve-2013-4560.patch (bnc#850469) FAM: fix use after free - added cve-2013-4508.patch and cve-2013-4508-regression-bug729480.patch: (bnc#849059) When defining an ssl.cipher-list, it works for the 'default' HTTPS setup ($SERVER['socket'] 443 block), but when you utilize SNI ($HTTP['host'] blocks within the $SERVER['socket'] block) the ssl.cipher-list seems to not inherit into the host blocks and instead will default to include all of the available openssl ciphers (except SSL v2/v3 based if those are disabled) - added cve-2013-4559.patch (bnc#850468) check success of setuid,setgid,setgroups - added cve-2013-4560.patch (bnc#850469) FAM: fix use after free
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 75389
    published 2014-06-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=75389
    title openSUSE Security Update : lighttpd (openSUSE-SU-2014:0072-1)
  • NASL family Amazon Linux Local Security Checks
    NASL id ALA_ALAS-2014-299.NASL
    description Use-after-free vulnerability in lighttpd before 1.4.33 allows remote attackers to cause a denial of service (segmentation fault and crash) via unspecified vectors that trigger FAMMonitorDirectory failures. lighttpd before 1.4.34, when SNI is enabled, configures weak SSL ciphers, which makes it easier for remote attackers to hijack sessions by inserting packets into the client-server data stream or obtain sensitive information by sniffing the network. lighttpd before 1.4.33 does not check the return value of the (1) setuid, (2) setgid, or (3) setgroups functions, which might cause lighttpd to run as root if it is restarted and allows remote attackers to gain privileges, as demonstrated by multiple calls to the clone function that cause setuid to fail when the user process limit is reached.
    last seen 2019-02-21
    modified 2018-04-18
    plugin id 72947
    published 2014-03-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=72947
    title Amazon Linux AMI : lighttpd (ALAS-2014-299)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-2795.NASL
    description Several vulnerabilities have been discovered in the lighttpd web server. It was discovered that SSL connections with client certificates stopped working after the DSA-2795-1 update of lighttpd. An upstream patch has now been applied that provides an appropriate identifier for client certificate verification. - CVE-2013-4508 It was discovered that lighttpd uses weak ssl ciphers when SNI (Server Name Indication) is enabled. This issue was solved by ensuring that stronger ssl ciphers are used when SNI is selected. - CVE-2013-4559 The clang static analyzer was used to discover privilege escalation issues due to missing checks around lighttpd's setuid, setgid, and setgroups calls. Those are now appropriately checked. - CVE-2013-4560 The clang static analyzer was used to discover a use-after-free issue when the FAM stat cache engine is enabled, which is now fixed.
    last seen 2019-02-21
    modified 2018-11-28
    plugin id 70982
    published 2013-11-21
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=70982
    title Debian DSA-2795-2 : lighttpd - several vulnerabilities
  • NASL family Mandriva Local Security Checks
    NASL id MANDRIVA_MDVSA-2013-277.NASL
    description Updated lighttpd packages fix security vulnerabilities : lighttpd before 1.4.34, when SNI is enabled, configures weak SSL ciphers, which makes it easier for remote attackers to hijack sessions by inserting packets into the client-server data stream or obtain sensitive information by sniffing the network (CVE-2013-4508). In lighttpd before 1.4.34, if setuid() fails for any reason, for instance if an environment limits the number of processes a user can have and the target uid already is at the limit, lighttpd will run as root. A user who can run CGI scripts could clone() often; in this case a lighttpd restart would end up with lighttpd running as root, and the CGI scripts would run as root too (CVE-2013-4559). In lighttpd before 1.4.34, if fam is enabled and there are directories reachable from configured doc roots and aliases on which FAMMonitorDirectory fails, a remote client could trigger a DoS (CVE-2013-4560).
    last seen 2019-02-21
    modified 2019-01-02
    plugin id 71031
    published 2013-11-22
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=71031
    title Mandriva Linux Security Advisory : lighttpd (MDVSA-2013:277)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-201406-10.NASL
    description The remote host is affected by the vulnerability described in GLSA-201406-10 (lighttpd: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in lighttpd. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could create a Denial of Service condition. Futhermore, a remote attacker may be able to execute arbitrary SQL statements. Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2018-07-12
    plugin id 76062
    published 2014-06-16
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=76062
    title GLSA-201406-10 : lighttpd: Multiple vulnerabilities
refmap via4
confirm http://download.lighttpd.net/lighttpd/security/lighttpd_sa_2013_02.txt
debian DSA-2795
hp HPSBGN03191
mlist [oss-security] 20131112 Re: CVE Request: lighttpd multiple issues (setuid/... unchecked return value, FAM: read after free)
secunia 55682
suse openSUSE-SU-2014:0072
Last major update 07-12-2016 - 22:03
Published 20-11-2013 - 09:12
Back to Top