Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
8.1
CVE-2021-34551: Untrusted PHPMailer Data Can Execute Malicious Code on Windows
CVE-2021-34551 · published 5 years ago
Summary
If you use PHPMailer on a Windows system and allow users to input the 'lang_path' parameter, a hacker could potentially execute malicious code on your server. This is a security risk because an attacker could gain control of your system. To fix this, update PHPMailer to version 6.5.0 or later.
What to do
- Update phpmailer phpmailer to version 6.5.0.
- Update phpmailer_project phpmailer to version 6.5.0 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| composer | phpmailer | phpmailer |
< 6.5.0 Fix: upgrade to 6.5.0
|
| – | phpmailer_project | phpmailer |
< 6.5.0 cpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:* |
| – | fedoraproject | fedora |
33 34 cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
Original advisory text
PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pathname.
PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pathname.
References
- https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-7q44-r25x-wm4q
- https://nvd.nist.gov/vuln/detail/CVE-2021-34551
- https://github.com/PHPMailer/PHPMailer/commit/acd264bf17ff4ac5c915f0d4226dce8a9e...
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- https://lists.fedoraproject.org/archives/list/[email protected]...
- https://lists.fedoraproject.org/archives/list/[email protected]...
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmai...
- https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0
- https://github.com/advisories/GHSA-7q44-r25x-wm4q
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro...
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro...
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically (estimated)
- Gives an attacker full control (estimated)
Type
CWE-94Code Injection
CWE-434Unrestricted File Upload
Timeline
Published16 Jun 2021
Updated30 Oct 2026
First seen6 Mar 2026
Track software like this
Free during beta