This article is more than 1 year old

Alert: If you're running SquirrelMail, Sendmail... why? And oh yeah, remote code vuln found

This is nuts

Updated Security researchers have uncovered a critical security hole in SquirrelMail, the open-source webmail project.

Filippo Cavallarin and Dawid Golunski independently discovered a remote code execution hole in SquirrelMail version 1.4.22 and likely prior. That's the latest version, by the way, and is dated July 2011.

The bug is a classic failure to sanitize user input, a shortcoming that makes it possible for authenticated attackers to execute arbitrary and malicious shell commands on a remote server running the vulnerable webmail software. The programming blunder is exploitable only in cases where SquirrelMail has been configured with Sendmail as the main transport.

Cavallarin went public with the bug, along with proof-of-concept exploit code, last week in a post to the Full Disclosure mailing list.

In response, Golunski – who had independently discovered the same vulnerability – went public with his own advisory about the same problem on Saturday. He said he reported the vulnerability to SquirrelMail at the start of the year, and was allocated CVE-2017-5181 for the as-yet unresolved flaw.

As a temporary workaround, users can configure their systems to not use Sendmail, Golunski recommends. ®

Updated to add

Developer Paul Lesniewski has been in touch to say the problem, which he reckons is not as serious at first blush, is getting resolved. He criticised one of the researchers for jumping the gun and publishing an advisory, adding that pressing personal issues have prevented him – as sole developer – from resolving the issue more quickly.

SquirrelMail version 1.5.2 as well as version 1.4.22 are vulnerable but patched versions 1.4.23-svn and 1.5.2-svn are now available. Exploitation even on unlatched systems relies on poor configuration and pre-established access to the system, according to Lesniewski.

"In order to exploit the bug, a malicious user would need to have already gained control over a mail account by other means, SquirrelMail would need to be configured to allow users to change their outgoing email address (we recommend keeping this disabled), the user would need to determine the location of the attachments directory (by gaining shell access or making guesses), the permissions on said directory and files would need to allow access by other processes (by default this will usually be the case, but prudent admins will exert more stringent access controls) and of course, SquirrelMail needs to be configured to send via Sendmail and not SMTP (default is SMTP)," Lesniewski said.

"My hope is that Good Administrators would have sensible system configurations that make this exploit unworkable. That doesn't mean the bug should not be fixed, and it has been."

Fixes are available at: https://sourceforge.net/p/squirrelmail/code/14649 https://sourceforge.net/p/squirrelmail/code/14650.

More about

TIP US OFF

Send us news


Other stories you might like