PT-2021-12009 · Phpmailer · Phpmailer
Published
2021-04-28
·
Updated
2024-03-06
·
CVE-2020-36326
CVSS v3.1
9.8
Critical
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions:
PHPMailer versions 6.1.8 through 6.4.0
Description:
The issue allows object injection through Phar Deserialization via the
addAttachment method with a UNC pathname. This is a reintroduction of an earlier problem due to an unrelated bug fix in PHPMailer 6.1.8. An external file may be unexpectedly executable if it is used as a path to an attachment file via PHP's support for .phar files. Exploitation requires that an attacker is able to provide an unfiltered path to a file to attach, or to trick calling code into generating one.Recommendations:
For PHPMailer versions 6.1.8 through 6.4.0, update to PHPMailer 6.4.1 to resolve the issue.
As a temporary workaround, validate paths to loaded files using the same pattern as used in
isPermittedPath() before using them in any PHP file function, such as file exists. This should be applied to all user-supplied paths passed into such functions.Exploit
Fix
Deserialization of Untrusted Data
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Phpmailer