# CVE-2017-7692

- Priority: **Prioritise**
- Reason: Public exploit (exploit-database, 23-04-2017)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2017-04-20 · Modified: 2024-08-05
- Aliases: MGASA-2017-0121, UBUNTU-CVE-2017-7692, DLA-941-1, DSA-3852-1
- Record: https://cvemate.com/vulnerability/CVE-2017-7692 · JSON: https://cvemate.com/vulnerability/CVE-2017-7692/json

## Description

```text
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.
```

## Signals

- CVSS: 9 high (v2.0, NVD) AV:N/AC:L/Au:S/C:C/I:C/A:C
- EPSS: 32.156%, percentile 98.358%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (reference, exploit-database)

## Affected

- debian squirrelmail (Debian): \< 2:1.4.23~svn20120406-2+deb8u1 \| \< 2:1.4.23~svn20120406-2+deb7u1
- ubuntu squirrelmail (Ubuntu): \< 2:1.4.23~svn20120406-2+deb8u1build0.14.04.1 \| \< 2:1.4.23~svn20120406-2+deb8u1ubuntu0.16.04.1
- mageia squirrelmail (Mageia): \< 1.4.22-12.2.mga5
- squirrelmail squirrelmail: 1.4.22

## References

- <https://legalhackers.com/advisories/SquirrelMail-Exploit-Remote-Code-Exec-CVE-2017-7692-Vuln.html>
- <http://www.securityfocus.com/bid/98067>
- <http://openwall.com/lists/oss-security/2017/04/19/6>
- <https://www.exploit-db.com/exploits/41910/>
- <https://security.gentoo.org/glsa/201709-13>
- <http://www.debian.org/security/2017/dsa-3852>
- <http://www.securitytracker.com/id/1038312>
- <http://openwall.com/lists/oss-security/2017/04/27/1>
- <https://advisories.mageia.org/MGASA-2017-0121.html>
- <https://bugs.mageia.org/show_bug.cgi?id=20703>
- <https://ubuntu.com/security/CVE-2017-7692>
- <http://www.openwall.com/lists/oss-security/2017/04/19/6>
- <https://www.cve.org/CVERecord?id=CVE-2017-7692>

---

Data as of 2026-12-05T11:42:31.423Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
