Command injection in SquirrelMail - CVE-2017-7692
Published: May 17, 2017
Vulnerability identifier: #VU6596
CSH Severity: High
CVSS v4: 9.4 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H]
CVE-ID: CVE-2017-7692
CWE-ID: CWE-77
Exploitation vector: Remote access
Exploit availability:
Public exploit is available
Vulnerability details
The vulnerability allows a remote authenticated attacker to execute arbitrary commands on a targeted system.
The weakness exists due to insufficient escaping of user-supplied input by the escapeshellcmd() when configured with Sendmail as the email delivery transport method. A remote attacker can upload a specially crafted sendmail.cf file as an email attachment that is mishandled in a popen call, trigger vulnerability in the Deliver_SendMail.class.php with the initStream function and execute arbitrary shell commands to conduct further attacks.
Successful exploitation of the vulnerability may result in full system compromise.
The weakness exists due to insufficient escaping of user-supplied input by the escapeshellcmd() when configured with Sendmail as the email delivery transport method. A remote attacker can upload a specially crafted sendmail.cf file as an email attachment that is mishandled in a popen call, trigger vulnerability in the Deliver_SendMail.class.php with the initStream function and execute arbitrary shell commands to conduct further attacks.
Successful exploitation of the vulnerability may result in full system compromise.
Affected software
SquirrelMail
Gentoo Linux
Debian Linux
Fedora
squirrelmail
Gentoo Linux
Debian Linux
Fedora
squirrelmail
How to mitigate CVE-2017-7692
Install update from vendor's website.
squirrelmail - addressed in versions 1.4.22-5.el6, 1.4.22-16.el7, 1.4.22-19.fc24, 1.4.22-19.fc25, 1.4.22-19.fc26