Arbitrary Code Execution Affecting phpmailer/phpmailer package, versions <6.5.0
Threat Intelligence
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-1311002
- published 17 Jun 2021
- disclosed 17 Jun 2021
- credit Jilin Diting Information Technology Co., Ltd
Introduced: 17 Jun 2021
CVE-2021-34551 Open this link in a new tabHow 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 $lang_path
parameter is passed unfiltered from user input, it can be set to a UNC path, and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows. PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility.