Arbitrary Code Execution Affecting phpmailer/phpmailer package, versions <6.5.0


0.0
critical

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    EPSS 0.34% (72nd percentile)
Expand this section
NVD
8.1 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PHP-PHPMAILERPHPMAILER-1311001
  • published 17 Jun 2021
  • disclosed 17 Jun 2021
  • credit Vikrant Singh Chauhan

How to fix?

Upgrade phpmailer/phpmailer to version 6.5.0 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution. If the $patternselect parameter to validateAddress() is set to 'php' (the default, defined by PHPMailer::$validator), and the global namespace contains a function called php, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names.

References