Remote code execution in SquirrelMail
Multiple products
At a glance
SquirrelMail 1.4.22 (and other versions before 20170427_0200-SVN) allows post-authentication remote code execution via a sendmail.cf file that is mishandled in a popen call. It's possible to exploit this vulnerability to execute arbitrary shell commands on the remote server. The problem is in the Deliver_SendMail.class.php with the initStream function that uses escapeshellcmd() to sanitize the sendmail command before executing it. The use of escapeshellcmd() is not correct in this case since it doesn't escape whitespaces, allowing the injection of arbitrary command parameters. The problem is in -f$envelopefrom within the sendmail command line. Hence, if the target server uses sendmail and SquirrelMail is configured to use it as a command-line program, it's possible to trick sendmail into using an attacker-provided configuration file that triggers the execution of an arbitrary command. For exploitation, the attacker must upload a sendmail.cf file as an email attachment, and inject the sendmail.cf filename with the -C option within the "Options > Personal Informations > Email Address" setting.
Source description · CVE List / CNA
System impact
CVSS summary v3.0
- Published:
- Updated:
- EPSS:
- 32.156%
- Exploited in attacks:
- Not confirmed
- Ransomware campaigns:
- Not confirmed
- Attack vector:
- Network
Related CWE
Affected software
Vendor, product and affected version ranges.
| Vendor | Product | Affected versions |
|---|---|---|
| Vendor:Red Hat | Red Hat Enterprise Linux 5 | Affected versions:Source does not specify a version range |
| Vendor:squirrelmail | squirrelmail | Affected versions:1.4.22Show full version range for squirrelmail
|
1–2 of 2 · Page 1 of 1
CVSS scores and metrics3
[email protected] · NVD (Primary)Primary8.8 / 10HighCVSS 3.0Details
- Attack complexity
- Low
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HRed Hat · Red Hat VEX (adp)7.5 / 10HighCVSS 3.0Details
- Attack complexity
- High
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H[email protected] · NVD (Primary)9.0 / 10HighCVSS 2.0Details
- Attack complexity
- Low
- Confidentiality
- Complete
- Integrity
- Complete
- Availability
- Complete
- Attack vector
- Network
- Authentication
- Single
Source vector
AV:N/AC:L/Au:S/C:C/I:C/A:CCVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.
This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences