# CVE-2021-3603: libphp-phpmailer: PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is i...

CVE-2021-3603 is fixed in libphp-phpmailer on 1 platform, first by libphp-phpmailer 6.0.6-0.1ubuntu0.1~esm1, released June 17, 2021. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2021-3603
- Priority: Routine
- CVSS: n/a (Medium)
- EPSS: 0.0226
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jun 17, 2021

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libphp-phpmailer Ubuntu 20.04 LTS (focal) | 6.0.6-0.1ubuntu0.1~esm1 | [libphp-phpmailer 6.0.6-0.1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libphp-phpmailer-6.0.6-0.1ubuntu0.1-esm1.md) | Jun 17, 2021 |
| Linux | libphp-phpmailer Ubuntu 22.04.1 LTS (jammy) | 6.2.0-2ubuntu0.1~esm1 | [libphp-phpmailer 6.2.0-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libphp-phpmailer-6.2.0-2ubuntu0.1-esm1.md) | Jun 17, 2021 |

---

Data as of 2026-11-08T00:53:09Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
