CVE-2017-7692
CVE-2017-7692 is a high-severity vulnerability in Squirrelmail with a CVSS 3.x base score of 8.8. Its EPSS exploit-prediction score of 32% places it in the 98th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-20.
Key facts
- Severity: High (CVSS 3.x base score 8.8)
- CVSS v2: 9.0
- EPSS exploit prediction: 32% (98th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-20
- Affected product: Squirrelmail
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2017-7692?
- 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.
- How severe is CVE-2017-7692?
- CVE-2017-7692 has a CVSS 3.x base score of 8.8, rated high severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2017-7692 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 32% (98th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2017-7692?
- CVE-2017-7692 affects Squirrelmail. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2017-7692?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2017-7692 published?
- CVE-2017-7692 was published on 2017-04-20 and last updated on 2026-06-17.
References
- http://openwall.com/lists/oss-security/2017/04/19/6
- http://openwall.com/lists/oss-security/2017/04/27/1
- http://www.debian.org/security/2017/dsa-3852
- http://www.securityfocus.com/bid/98067
- http://www.securitytracker.com/id/1038312
- https://legalhackers.com/advisories/SquirrelMail-Exploit-Remote-Code-Exec-CVE-2017-7692-Vuln.html
- https://security.gentoo.org/glsa/201709-13
- https://www.exploit-db.com/exploits/41910/
Affected products (1)
- cpe:2.3:a:squirrelmail:squirrelmail:1.4.22:*:*:*:*:*:*:*
More vulnerabilities in Squirrelmail
- CVE-2004-0521 — Critical (CVSS 10.0): SQL injection vulnerability in SquirrelMail before 1.4.3 RC1 allows remote attackers to execute unauthorized SQL…
- CVE-2002-0516 — Critical (CVSS 10.0): SquirrelMail 1.2.5 and earlier allows authenticated SquirrelMail users to execute arbitrary commands by modifying the…
- CVE-2020-14932 — Critical (CVSS 9.8): compose.php in SquirrelMail 1.4.22 calls unserialize for the $mailtodata value, which originates from an HTTP GET…
- CVE-2020-14933 — High (CVSS 8.8): compose.php in SquirrelMail 1.4.22 calls unserialize for the $attachments value, which originates from an HTTP POST…
- CVE-2018-8741 — High (CVSS 8.8): A directory traversal flaw in SquirrelMail 1.4.22 allows an authenticated attacker to exfiltrate (or potentially…
- CVE-2007-3636 — High (CVSS 7.5): Multiple unspecified vulnerabilities in the G/PGP (GPG) Plugin 2.1 for Squirrelmail allow remote attackers to execute…
All CVEs affecting Squirrelmail →
Other CWE-20 (Improper Input Validation) vulnerabilities
- CVE-2026-48316 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48281 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48277 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Input Validation vulnerability that could…
- CVE-2026-48055 — Critical (CVSS 10.0): Streambert is a cross-platform Electron Desktop App to stream and download any video media. In versions 2.4.0 and…
- CVE-2026-34910 — Critical (CVSS 10.0): A malicious actor with access to the network could exploit an Improper Input Validation vulnerability found in UniFi OS…
- CVE-2026-33587 — Critical (CVSS 10.0): Lack of user input sanitisation in Open Notebook v1.8.3 allows the application user to execute Python code (and…
Browse all CWE-20 (Improper Input Validation) vulnerabilities →