The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.
https://www.exploit-db.com/exploits/42221/
https://www.exploit-db.com/exploits/40986/
https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20
https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html
http://www.securitytracker.com/id/1037533
http://www.securityfocus.com/archive/1/539967/100/0/threaded