---
title: "CVE-2021-3603\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2021-3603?format=md
keywords: index, follow
---

# CVE-2021-3603

Publication date 17 June 2021

Last updated 26 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**8.1 · High**

[Score breakdown](https://ubuntu.com/security/CVE-2021-3603?format=md#impact-score)

Toggle side navigation

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

[Read the notes from the security team](https://ubuntu.com/security/CVE-2021-3603?format=md#notes)

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| libphp-phpmailer | 26.04 LTS resolute | Not affected |
| 25.10 questing | Not affected |
| 25.04 plucky | Not affected |
| 24.10 oracular | Not affected |
| 24.04 LTS noble | Not affected |
| 23.10 mantic | Not affected |
| 23.04 lunar | Not affected |
| 22.10 kinetic | Not affected |
| 22.04 LTS jammy | Fixed 6.2.0-2ubuntu0.1~esm1  Ubuntu Pro |
| 21.10 impish | Ignored end of life |
| 21.04 hirsute | Ignored end of life |
| 20.10 groovy | Ignored end of life |
| 20.04 LTS focal | Fixed 6.0.6-0.1ubuntu0.1~esm1  Ubuntu Pro |
| 18.04 LTS bionic | Not affected |
| 16.04 LTS xenial | Not affected |
| 14.04 LTS trusty | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2021-3603?format=md#patch-details)

### Get expanded security coverage with Ubuntu Pro

Reduce your average CVE exposure time from 98 days to 1 day with expanded CVE patching, ten-years security maintenance and optional support for the full stack of open-source applications. Free for personal use.

[Get Ubuntu Pro](https://ubuntu.com/pro)
[30-day free trial](https://ubuntu.com/pro/free-trial)

## Notes

---

### [ccdm94](https://launchpad.net/~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.

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| libphp-phpmailer | * Upstream:   [45f3c18](https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

8.1 · High

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | High |
  | Privileges required | None |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 8.1 · High |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3603)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2021-3603)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2021-3603)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2021-3603)

### Related Ubuntu Security Notices (USN)

+ [USN-5956-1](https://usn.ubuntu.com/USN-5956-1)
+ PHPMailer vulnerabilities
+ 15 March 2023

### Other references

* <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://www.cve.org/CVERecord?id=CVE-2021-3603>
