CVE-2014-9465: Remote disk space exhaustion in Zarafa
Am 5. September 2014 habe ich entdeckt, dass ein entfernter Angreifer ohne vorhergehende Authentifikation beim Zarafa WebAccess und der Zarafa WebApp das temporäre Verzeichnis "/tmp/" über HTTP(S) befüllen kann. Je nach Lage des Verzeichnisses auf dem Dateisystem kann damit die gesamte Festplatte des Servers befüllt werden - was die Verfügbarkeit der restlichen Dienste auf dem Server einschränken kann. Nachfolgend das Security Advisory in englischer Sprache:
Background
Zarafa is a leading European provider of open source groupware and collaboration software. The core product is the Zarafa Collaboration Platform (ZCP), an European open and compatible groupware platform that can be used as a drop-in Microsoft Exchange replacement for e-mail, calendaring, collaboration and tasks (origin: Zarafa company profile).
Description
For accessing e-mails, calendars, contacts and tasks of the groupware platform via the web, Zarafa provides the Zarafa WebAccess and the Zarafa WebApp as clients/frontends. The Zarafa WebApp is a fork and the successor of the Zarafa WebAccess. Both web clients/frontends provide a PHP script that could allow remote unauthenticated attackers to upload files via HTTP(S) to exhaust the disk space of /tmp/ of the server offering the Zarafa WebAccess or Zarafa WebApp. This flaw thus allows a so-called unauthenticated remote denial of service.
CVSS v2 metrics
- Base Score: 5
- Base Metrics: AV:N/AC:L/Au:N/C:N/I:N/A:P
- Access Vector: Network
- Access Complexity: Low
- Authentication: None
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: Partial
Analysis
There is no exploitation which would allow unauthenticated remote attackers to gain root access. However, depending on the server setup, /tmp/ might be a part of / (the root filesystem) such as e.g. on RHEL or CentOS. If the disk space on the root filesystem is exhausted this usually impacts all services (including services that are not affiliated with Zarafa) running on the server negatively. Given the default upload size of Zarafa WebAccess and Zarafa WebApp are 30 MB and the network bandwidth of the server offering the Zarafa WebAccess or Zarafa WebApp has relevance as well, this attack is practically harder to perform on public reachable systems in the Internet rather on local ones (such as in the Intranet) because a possible attacker requires a broad upload network bandwith to be effective.
The second parameter of PHP tempnam()
is, according to the PHP documentation, only a prefix and thus $tmpname
as return value of the tempnam()
call in senddocument.php should not be predictable (for local race conditions).
Reproducability
Even the following commands could be used to actively exploit and abuse this flaw they are only made public to analyze if the system in question is vulnerable or not. A system with Zarafa WebAccess is affected if the following command proofs the existence of the file /usr/share/zarafa-webaccess/senddocument.php:
tux:~ # ls -l /usr/share/zarafa-webaccess/
total 40
drwxr-xr-x. 7 root root 4096 Sep 9 17:12 client
lrwxrwxrwx. 1 root root 37 Sep 9 17:12 config.php -> /etc/zarafa/webaccess-ajax/config.php
-rw-r--r--. 1 root root 3047 Sep 3 09:56 defaults.php
-rw-r--r--. 1 root root 8550 Sep 3 09:56 index.php
lrwxrwxrwx. 1 root root 33 Sep 9 17:12 plugins -> /var/lib/zarafa-webaccess/plugins
-rw-r--r--. 1 root root 315 Sep 3 09:56 senddocument.php
drwxr-xr-x. 6 root root 4096 Sep 9 17:12 server
-rw-r--r--. 1 root root 3109 Sep 3 09:56 static.php
-rw-r--r--. 1 root root 6806 Sep 3 09:56 zarafa.php
tux:~ #
When using Zarafa WebApp rather Zarafa WebAccess the following command can be used. The system is affected if the file /usr/share/zarafa-webapp/senddocument.php exists:
tux:~ # ls -l /usr/share/zarafa-webapp/
total 64
drwxr-xr-x. 8 root root 4096 Sep 21 00:42 client
lrwxrwxrwx. 1 root root 29 Sep 9 17:12 config.php -> /etc/zarafa/webapp/config.php
-rw-r--r--. 1 root root 4382 Sep 3 10:55 defaults.php
-rw-r--r--. 1 root root 14079 Sep 3 10:55 index.php
-rw-r--r--. 1 root root 247 Sep 3 10:55 init.php
drwxr-xr-x. 2 root root 4096 Sep 9 17:12 mapi
drwxr-xr-x. 20 root root 4096 Oct 9 12:00 plugins
-rw-r--r--. 1 root root 450 Sep 3 10:55 senddocument.php
drwxr-xr-x. 8 root root 4096 Sep 21 00:47 server
-rw-r--r--. 1 root root 10 Sep 3 10:57 version
-rw-r--r--. 1 root root 8575 Sep 3 10:55 zarafa.php
tux:~ #
Workaround
Until a fixed version of the Zarafa WebAccess is available (or for a system where a possible future update can not be applied for different reasons) the following command can be used to remove the vulnerable PHP script:
tux:~ # rm -f /usr/share/zarafa-webaccess/senddocument.php
tux:~ #
When using Zarafa WebApp rather Zarafa WebAccess the following command can be used to remove the vulnerable PHP script.
tux:~ # rm -f /usr/share/zarafa-webapp/senddocument.php
tux:~ #
Both command sections above are however only treated as a workaround because a possible non-fixed intermediate update of Zarafa WebAccess or Zarafa WebApp might reintroduce the vulnerability again.
Solution
As there are fixed releases of the Zarafa WebAccess and the Zarafa WebApp available, an update is highly recommented over any workaround.
Possibly affected versions
- Zarafa WebAccess 7.0.0 TP (23713), released 2010-11-05
- Zarafa WebAccess 7.0.0 Alpha 1 (23713), released 2010-11-05
Affected versions
- Zarafa WebAccess 7.0.0 Beta 1 (24488), released 2010-12-30
- Zarafa WebAccess 7.0.0 Beta 2 (24874), released 2011-01-21
- Zarafa WebAccess 7.0.0 Beta 3 (25734), released 2011-03-08
- Zarafa WebAccess 7.0.0 RC 1 (26667), released 2011-04-21
- Zarafa WebAccess 7.0.0 RC 2 (27588), released 2011-06-10
- Zarafa WebAccess 7.0.0 Final (27791), released 2011-06-27
- Zarafa WebAccess 7.0.1 Beta 1 (28354), released 2011-07-26
- Zarafa WebAccess 7.0.1 Beta 2 (28479), released 2011-08-04
- Zarafa WebAccess 7.0.1 Final (28479), released 2011-08-12
- Zarafa WebAccess 7.0.2 Beta 1 (29238), released 2011-09-15
- Zarafa WebAccess 7.0.2 Final (29470), released 2011-09-29
- Zarafa WebAccess 7.0.3 Beta 1 (30283), released 2011-11-03
- Zarafa WebAccess 7.0.3 Beta 2 (30383), released 2011-11-11
- Zarafa WebAccess 7.0.3 Final (30515), released 2011-11-17
- Zarafa WebAccess 7.0.4 Beta 1 (31042), released 2011-12-09
- Zarafa WebAccess 7.0.4 Beta 2 (31131), released 2011-12-15
- Zarafa WebAccess 7.0.4 Final (31235), released 2011-12-22
- Zarafa WebAccess 7.0.5 Beta 1 (31699), released 2012-01-20
- Zarafa WebAccess 7.0.5 Final (31880), released 2012-02-02
- Zarafa WebAccess 7.0.6 Beta 1 (32585), released 2012-03-02
- Zarafa WebAccess 7.0.6 Final (32752), released 2012-03-15
- Zarafa WebAccess 7.0.7 Beta 1 (33784), released 2012-04-13
- Zarafa WebAccess 7.0.7 Beta 2 (34052), released 2012-04-26
- Zarafa WebAccess 7.0.7 Final (34256), released 2012-05-04
- Zarafa WebAccess 7.0.8 Beta 1 (35040), released 2012-06-08
- Zarafa WebAccess 7.0.8 Final (35178), released 2012-06-19
- Zarafa WebAccess 7.0.9 Beta 1 (36013), released 2012-07-19
- Zarafa WebAccess 7.0.9 Beta 2 (36190), released 2012-07-26
- Zarafa WebAccess 7.0.9 Beta 3 (36358), released 2012-08-03
- Zarafa WebAccess 7.0.9 Final (36358), released 2012-08-10
- Zarafa WebAccess 7.0.10 Beta 1 (37262), released 2012-09-20
- Zarafa WebAccess 7.0.10 Final (37482), released 2012-10-04
- Zarafa WebAccess 7.0.11 Beta 1 (38406), released 2012-11-16
- Zarafa WebAccess 7.0.11 Beta 2 (38914), released 2012-11-30
- Zarafa WebAccess 7.0.11 Final (39120), released 2012-12-08
- Zarafa WebAccess 7.0.12 Beta 1 (39988), released 2013-01-10
- Zarafa WebAccess 7.0.12 Final (40336), released 2013-01-24
- Zarafa WebAccess 7.0.13 Final (41388), released 2013-03-01
- Zarafa WebAccess 7.0.14 Beta 1 (41924), released 2013-05-23
- Zarafa WebAccess 7.0.14 Final (42060), released 2013-07-01
- Zarafa WebAccess 7.0.15 Beta 1 (42582), released 2013-09-03
- Zarafa WebAccess 7.0.15 Beta 2 (42658), released 2013-09-13
- Zarafa WebAccess 7.0.15 Final (42709), released 2013-09-20
- Zarafa WebAccess 7.1.0 Beta 1 (33926), released 2012-04-19
- Zarafa WebAccess 7.1.0 Beta 2 (34517), released 2012-05-11
- Zarafa WebAccess 7.1.0 Beta 3 (34833), released 2012-06-01
- Zarafa WebAccess 7.1.0 RC 1 (35476), released 2012-06-29
- Zarafa WebAccess 7.1.0 RC 2 (36025), released 2012-07-19
- Zarafa WebAccess 7.1.0 RC 3 (36420), released 2012-08-09
- Zarafa WebAccess 7.1.0 Final (36420), released 2012-08-23
- Zarafa WebAccess 7.1.1 Beta 1 (37267), released 2012-09-20
- Zarafa WebAccess 7.1.1 Beta 2 (37519), released 2012-10-04
- Zarafa WebAccess 7.1.1 Final (37812), released 2012-10-19
- Zarafa WebAccess 7.1.2 Beta 1 (38366), released 2012-11-15
- Zarafa WebAccess 7.1.2 Beta 2 (38915), released 2012-11-30
- Zarafa WebAccess 7.1.2 Final (39121), released 2012-12-08
- Zarafa WebAccess 7.1.3 Beta 1 (39980), released 2013-01-10
- Zarafa WebAccess 7.1.3 Final (40304), released 2013-01-24
- Zarafa WebAccess 7.1.4 Final (41394), released 2013-03-01
- Zarafa WebAccess 7.1.5 Beta 1 (41923), released 2013-05-23
- Zarafa WebAccess 7.1.5 Final (42059), released 2013-07-01
- Zarafa WebAccess 7.1.6 Beta 1 (42574), released 2013-09-03
- Zarafa WebAccess 7.1.6 Beta 2 (42668), released 2013-09-13
- Zarafa WebAccess 7.1.6 Final (42710), released 2013-09-20
- Zarafa WebAccess 7.1.7 Final (42779), released 2013-10-03
- Zarafa WebAccess 7.1.8 Beta 1 (42841), released 2013-10-10
- Zarafa WebAccess 7.1.8 Beta 2 (43059), released 2013-11-08
- Zarafa WebAccess 7.1.8 Beta 3 (43454), released 2013-12-20
- Zarafa WebAccess 7.1.8 RC 1 (43691), released 2014-01-23
- Zarafa WebAccess 7.1.8 Final (43801), released 2014-01-30
- Zarafa WebAccess 7.1.8 Final R1 (44004), released 2014-02-20
- Zarafa WebAccess 7.1.9 Beta 1 (44152), released 2014-03-12
- Zarafa WebAccess 7.1.9 RC 1 (44268), released 2014-03-24
- Zarafa WebAccess 7.1.9 Final (44333), released 2014-03-31
- Zarafa WebAccess 7.1.10 Beta 1 (44846), released 2014-05-12
- Zarafa WebAccess 7.1.10 RC 1 (44973), released 2014-05-26
- Zarafa WebAccess 7.1.10 Final (44973), released 2014-06-03
- Zarafa WebAccess 7.1.11 Beta 1 (45653), released 2014-08-07
- Zarafa WebAccess 7.1.11 Final (45875), released 2014-08-26
- Zarafa WebAccess 7.1.11 Final R1 (46050), released 2014-09-05
- Zarafa WebApp 1.0 TP (27895), released 2011-06-28
- Zarafa WebApp 1.0 TP, released 2011-07-28
- Zarafa WebApp 1.0 TP, released 2011-09-06
- Zarafa WebApp 1.0 TP, released 2011-12-20
- Zarafa WebApp 1.0 Final (33778), released 2012-04-12
- Zarafa WebApp 1.1 Final (35292), released 2012-06-20
- Zarafa WebApp 1.2 TP (36382), released 2012-08-07
- Zarafa WebApp 1.2 Final (37787), released 2012-10-26
- Zarafa WebApp 1.2.1 Final (37967), released 2012-10-26
- Zarafa WebApp 1.2.2 Final (39122), released 2012-12-07
- Zarafa WebApp 1.3 Final (41013), released 2013-02-12
- Zarafa WebApp 1.3.1 Final (41348), released 2013-02-22
- Zarafa WebApp 1.3.2 Final (42118), released 2013-09-19
- Zarafa WebApp 1.4 Alpha (42030), released 2013-06-20
- Zarafa WebApp 1.4 Beta (42591), released 2013-09-06
- Zarafa WebApp 1.4 Final (42633), released 2013-10-03
- Zarafa WebApp 1.5 Beta (43468), released 2013-12-20
- Zarafa WebApp 1.5 Final (43477), released 2014-01-22
- Zarafa WebApp 1.6 Beta 1 (45198), released 2014-06-17
- Zarafa WebApp 1.6 Beta 2 (45312), released 2014-07-01
- Zarafa WebApp 1.6 Final (45357), released 2014-07-21
- Zarafa WebApp 1.6.1 Final (46039), released 2014-09-02
- Zarafa WebApp 2.0 Beta 1 (46301)
- Zarafa WebApp 2.0 Beta 2 (46339), released 2014-09-30
Fixed versions
- Zarafa WebAccess 7.1.12 Beta 1 (47484), released 2015-01-16
- Zarafa WebAccess 7.1.12 Beta 2 (48455), released 2015-03-20
- Zarafa WebAccess 7.1.12 Final (48726), released 2015-04-07
- Zarafa WebAccess 7.1.12 Final R1 (49411), released 2015-05-08
- Zarafa WebAccess 7.2.0 Beta 1 (46984), released 2014-12-05
- Zarafa WebAccess 7.2.0 Beta 1 (47004), released 2014-12-05
- Zarafa WebAccess 7.2.0 Beta 2 (47829), released 2015-02-09
- Zarafa WebAccess 7.2.0 Final (48204), released 2015-03-05
- Zarafa WebApp 2.0 Beta 3 (46848), released 2014-11-20
- Zarafa WebApp 2.0 Beta (47004), released 2014-12-05
- Zarafa WebApp 2.0 Beta (47017), released 2014-12-08
- Zarafa WebApp 2.0 RC 1 (47260), released 2014-12-24
- Zarafa WebApp 2.0 Final (47678), released 2015-01-27
- Zarafa WebApp 2.0.1 Final (47791), released 2015-02-06
- Zarafa WebApp 2.0.2 Final (47834), released 2015-02-09
- Zarafa WebApp 2.0.2 Final (48619), released 2015-04-02
CVE information
The MITRE Corporation Common Vulnerabilities and Exposures (CVE) number CVE-2014-9465 was assigned on January 3, 2015. Currently, the following other identifications are known for this issue:
- MITRE CVE-2014-9465
- RSC-SA-2014-0010
- Zarafa ZCP-12596
- Red Hat RHBZ #1139442
- OSS-SEC 2014/Q4/954
- SecurityFocus BID-71863
- DFN-CERT-2015-0510
Disclosure timeline
- 2014-09-05: Initial vulnerability discovery
- 2014-09-09: Initial vendor notification, response and acknowledgement
- 2014-10-14: Vendor communicated an unknown timeframe
- 2014-11-20: Vendor provides a fixed public beta/pre-release
- 2014-12-07: Coordinated public disclosure
- 2015-01-03: MITRE CVE assignment team assignes CVE name
- 2015-01-27: Vendor releases a fixed public final version
Credit
This vulnerability was discovered, analyzed and reported by Robert Scheck.
Robert Scheck would like to thank Murray McAllister of the Red Hat Security Response Team for his time and support.
Legal notices
Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an as is condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.