CVE-2017-7692

Summary

CVECVE-2017-7692
StatePUBLISHED
Assignermitre
Source PriorityCVE Program / NVD first with legacy fallback
Published2017-04-20 14:59:00 UTC
Updated2025-04-20 01:37:25 UTC
DescriptionSquirrelMail 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.

Risk And Classification

Primary CVSS: v3.0 8.8 HIGH from [email protected]

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Problem Types: CWE-20 | n/a


VersionSourceTypeScoreSeverityVector
3.0[email protected]Primary8.8HIGHCVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
2.0[email protected]Primary9AV:N/AC:L/Au:S/C:C/I:C/A:C

CVSS v3.0 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS v2.0 Breakdown

Access Vector
Network
Access Complexity
Low
Authentication
Single
Confidentiality
Complete
Integrity
Complete
Availability
Complete

AV:N/AC:L/Au:S/C:C/I:C/A:C

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Squirrelmail Squirrelmail 1.4.22 All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na N/a affected n/a Not specified

References

ReferenceSourceLinkTags
SquirrelMail-Exploit-Remote-Code-Exec-CVE-2017-7692-Vuln af854a3a-2127-422b-91ae-364da2661108 legalhackers.com Exploit, Third Party Advisory
Squirrelmail CVE-2017-7692 Command Injection Vulnerability af854a3a-2127-422b-91ae-364da2661108 www.securityfocus.com
SquirrelMail Input Validation Flaw in 'Deliver_SendMail.class.php' Lets Remote Authenticated Users Execute Arbitrary Commands on the Target System - SecurityTracker af854a3a-2127-422b-91ae-364da2661108 www.securitytracker.com
oss-security - CVE-2017-7692: Squirrelmail 1.4.22 Remote Code Execution af854a3a-2127-422b-91ae-364da2661108 openwall.com Mailing List, Third Party Advisory
SquirrelMail < 1.4.22 - Remote Code Execution af854a3a-2127-422b-91ae-364da2661108 www.exploit-db.com
oss-security - Re: SquirrelMail <= 1.4.23 Remote Code Execution (CVE-2017-7692) af854a3a-2127-422b-91ae-364da2661108 openwall.com
SquirrelMail: Remote Code Execution (GLSA 201709-13) — Gentoo security af854a3a-2127-422b-91ae-364da2661108 security.gentoo.org
Debian -- Security Information -- DSA-3852-1 squirrelmail af854a3a-2127-422b-91ae-364da2661108 www.debian.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report