CVE-2021-3603
Published: 17 June 2021
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.
Notes
Author | Note |
---|---|
ccdm94 | the vulnerable code section seems to have been introduced by commit 77c0bc8d (v.5.2.15). For this reason, bionic and earlier are not vulnerable. |
Priority
Status
Package | Release | Status |
---|---|---|
libphp-phpmailer Launchpad, Ubuntu, Debian |
trusty |
Does not exist
|
bionic |
Not vulnerable
(code not present)
|
|
groovy |
Ignored
(end of life)
|
|
upstream |
Released
(6.5.0)
|
|
hirsute |
Ignored
(end of life)
|
|
impish |
Ignored
(end of life)
|
|
kinetic |
Not vulnerable
(6.6.3-1)
|
|
xenial |
Not vulnerable
(code not present)
|
|
lunar |
Not vulnerable
(6.6.3-1)
|
|
focal |
Released
(6.0.6-0.1ubuntu0.1~esm1)
Available with Ubuntu Pro |
|
jammy |
Released
(6.2.0-2ubuntu0.1~esm1)
Available with Ubuntu Pro |
|
Patches: upstream: https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3 |
Severity score breakdown
Parameter | Value |
---|---|
Base score | 8.1 |
Attack vector | Network |
Attack complexity | High |
Privileges required | None |
User interaction | None |
Scope | Unchanged |
Confidentiality | High |
Integrity impact | High |
Availability impact | High |
Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
References
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3603
- https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/
- https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3 (v6.5.0)
- https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3
- https://ubuntu.com/security/notices/USN-5956-1
- NVD
- Launchpad
- Debian