1

Topic: Roundcube Vulnerability

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.95-1
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Greetings, I found this about Roundcube this morning on The Register. I thought that since we've got so many users who depend on Roundcube, that this is probably an important thing to check / update.

http://www.theregister.co.uk/2016/12/07 … mail_flaw/

From the article:

The developers of open source webmail package Roundcube want sysadmins to push in a patch, because a bug in versions prior to 1.2.3 let an attacker crash it remotely – by sending what looks like valid e-mail data.

The authors overlooked sanitising the fifth argument (the _from parameter) in mail() – and that meant someone only needed to compose an e-mail with malicious info in that argument to attack Roundcube.

It works because of how the program flows in a default installation. User input from the Roundcube UI is passed to PHP's mail() function, and mail() calls sendmail.

Because the user input wasn't sanitised until the bug-fix, the fifth argument when calling mail() could be used to execute sendmail with the -X option to log all mail traffic – and that, according to RIPS Technologies in this blog post, could be abused to spawn a malicious PHP file in the target server's Webroot directory.

If it hasn't already been patched, it sounds like this one needs to be. Just a heads-up!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube Vulnerability

Here's a direct link to fix this without updating whole package:
https://github.com/roundcube/roundcubem … 8a62f167e1

3

Re: Roundcube Vulnerability

Thanks RikuS! I went ahead and updated the whole thing to 1.2.3, anyway. It was just as fast, and it appears to work just fine with the current version of iRedMail as far as things appear to be going so far. I'm more than happy to be a test subject and make sure that the current version of Roundcube works with the current version of iRedMail. Most of my users are actually just straight up mail client-using IMAP users, and don't touch the web interface much, but every once in a while it does come in handy. One thing that I did have to disable temporarily is the Google Authenticator plugin for Roundcube, but seeing as how that's not a standard installation with iRedMail, and I added that after the fact to do OTP Auth, I just disabled it until I can figure out why it doesn't appear to properly function, but it may just need updating to work with the newer version of Roundcube.

4

Re: Roundcube Vulnerability

Oops, i posted a tweet but forgot to send a mailing list post. Will send one soon.
Thanks for the remind guys. smile