Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-m298-fh5c-jc66

Опубликовано: 04 мая 2021
Источник: github
Github: Прошло ревью
CVSS3: 9.8

Описание

Object injection in PHPMailer/PHPMailer

Impact

This is a reintroduction of an earlier issue (CVE-2018-19296) by 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. See this article for more info.

Patches

This issue was patched in the PHPMailer 6.4.1 release. This release also implements stricter filtering for attachment paths; paths that look like any kind of URL are rejected.

Workarounds

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 method can't be used directly because it is protected, but you can implement the same thing in calling code. Note that this should be applied to all user-supplied paths passed into such functions; it's not a problem specific to PHPMailer.

Credit

This issue was found by Fariskhi Vidyan, reported and managed via Tidelift.

Пакеты

Наименование

phpmailer/phpmailer

composer
Затронутые версииВерсия исправления

>= 6.1.8, < 6.4.1

6.4.1

EPSS

Процентиль: 76%
0.0099
Низкий

9.8 Critical

CVSS3

Дефекты

CWE-502
CWE-641

Связанные уязвимости

CVSS3: 9.8
ubuntu
около 4 лет назад

PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.

CVSS3: 9.8
nvd
около 4 лет назад

PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.

CVSS3: 9.8
debian
около 4 лет назад

PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Des ...

EPSS

Процентиль: 76%
0.0099
Низкий

9.8 Critical

CVSS3

Дефекты

CWE-502
CWE-641