PT-2021-3390 · Phpmailer+3 · Phpmailer+3
Vikrant Singh Chauhan
·
Published
2021-06-17
·
Updated
2024-03-06
·
CVE-2021-3603
CVSS v3.1
8.1
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
PHPMailer versions 6.4.1 and earlier
Description
The issue is related to the validateAddress function in PHPMailer, which can lead to the execution of untrusted code if such code is injected into the host project's scope by other means. This occurs when the $patternselect parameter is set to 'php' (the default) and a function named php exists in the global namespace, causing it to be called instead of the built-in validator. The problem is associated with the inclusion of functions from an untrusted controlled area.
Recommendations
For PHPMailer versions 6.4.1 and earlier, update to PHPMailer 6.5.0 to mitigate the issue, as it denies the use of simple strings as validator function names. As a temporary workaround, consider disabling the
validateAddress() function until a patch is available. Restrict access to the global namespace to prevent the injection of malicious functions. Avoid using the php function name in the global namespace to minimize the risk of exploitation.Exploit
Fix
Special Elements Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Debian
Linuxmint
Phpmailer
Ubuntu