Description
PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.
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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libphp-phpmailer | 5.2.14+dfsg-2.4 | — |
| Debian 13 | libphp-phpmailer | 5.2.14+dfsg-2.4 | — |
| Debian 12 | libphp-phpmailer | 5.2.14+dfsg-2.4 | — |
| Debian 9 | libphp-phpmailer | 5.2.14+dfsg-2.3+deb9u1 | DSA-4351-1 |
| Debian 8 | libphp-phpmailer | 5.2.9+dfsg-2+deb8u4 | DLA-1591-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | libphp-phpmailer | 5.2.14+dfsg-2.3+deb9u1build0.18.04.1 | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
| Ubuntu Pro 16.04 LTS | libphp-phpmailer | 5.2.14+dfsg-1ubuntu0.1~esm1 | USN-5956-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | phpmailer/phpmailer | >= 5.0.0, < 5.2.27 | 5.2.27 | GHSA-7w4p-72j7-v7c2 |
| Packagist | phpmailer/phpmailer | >= 6.0.0, < 6.0.6 | 6.0.6 | GHSA-7w4p-72j7-v7c2 |
Advisories 3
- USN-5956-1 libphp-phpmailer vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DSA-4351-1 libphp-phpmailer - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1591-1 libphp-phpmailer - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.27
- [debian-lts-announce] 20181228 [SECURITY] [DLA 1591-2] libphp-phpmailer regression update mailing-list
- DSA-4351 vendor-advisory
- https://github.com/PHPMailer/PHPMailer/releases/tag/v6.0.6
- FEDORA-2021-b21bbfa198 vendor-advisory
- FEDORA-2021-ecf4fed550 vendor-advisory