UBUNTU-CVE-2017-7692

Source
https://ubuntu.com/security/CVE-2017-7692
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2017/UBUNTU-CVE-2017-7692.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2017-7692
Upstream
Published
2017-04-20T14:59:00Z
Modified
2025-07-16T08:13:27.659732Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
  • Ubuntu - medium
Summary
[none]
Details

SquirrelMail 1.4.22 (and other versions before 201704270200-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 DeliverSendMail.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.

References

Affected packages

Ubuntu:14.04:LTS / squirrelmail

Package

Name
squirrelmail
Purl
pkg:deb/ubuntu/squirrelmail@2:1.4.23~svn20120406-2+deb8u1build0.14.04.1?arch=source&distro=trusty

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2:1.4.23~svn20120406-2+deb8u1build0.14.04.1

Affected versions

2:1.*
2:1.4.23~svn20120406-2

Ecosystem specific

{
    "availability": "No subscription required",
    "binaries": [
        {
            "binary_version": "2:1.4.23~svn20120406-2+deb8u1build0.14.04.1",
            "binary_name": "squirrelmail"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2017/UBUNTU-CVE-2017-7692.json"

Ubuntu:16.04:LTS / squirrelmail

Package

Name
squirrelmail
Purl
pkg:deb/ubuntu/squirrelmail@2:1.4.23~svn20120406-2+deb8u1ubuntu0.16.04.1?arch=source&distro=xenial

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2:1.4.23~svn20120406-2+deb8u1ubuntu0.16.04.1

Affected versions

2:1.*
2:1.4.23~svn20120406-2
2:1.4.23~svn20120406-2ubuntu1
2:1.4.23~svn20120406-2ubuntu1.16.04.1

Ecosystem specific

{
    "availability": "No subscription required",
    "binaries": [
        {
            "binary_version": "2:1.4.23~svn20120406-2+deb8u1ubuntu0.16.04.1",
            "binary_name": "squirrelmail"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2017/UBUNTU-CVE-2017-7692.json"