Skip to content
OpenAdvisories
High · 8.1 CVE-2021-3603 BIT-phpmailer-2021-3603EUVD-2021-1277GHSA-77mr-wc79-m8j3

Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer

Published Jun 17, 2021 · Updated Aug 3, 2024 · Assigned by @huntrdev

Description

PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). 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.

Affected products

VendorProductAffectedFixed
PHPMailer PHPMailer unspecified – < 6.5.0 6.5.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libphp-phpmailer 6.6.3-1 —
Debian 13 libphp-phpmailer 6.6.3-1 —
Debian 12 libphp-phpmailer 6.6.3-1 —
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS libphp-phpmailer 6.2.0-2ubuntu0.1~esm1 USN-5956-1
Ubuntu Pro 20.04 LTS libphp-phpmailer 6.0.6-0.1ubuntu0.1~esm1 USN-5956-1
Ubuntu Pro 18.04 LTS libphp-phpmailer 5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1 USN-5956-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS libphp-phpmailer 5.2.14+dfsg-1ubuntu0.1~esm1 USN-5956-1

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist phpmailer/phpmailer < 6.5.0 6.5.0 GHSA-77mr-wc79-m8j3

Advisories 2

References