Skip to content
Fencer Vulns
high 8.1

CVE-2021-34551 json

Remote Code Execution vulnerability in PHPMailer 6.4.1 running on Windows

published 2021-06-16 5 y ago modified 2026-09-08 2 mo ago also BIT-phpmailer-2021-34551 , EUVD-2021-1283 , GHSA-7q44-r25x-wm4q

cvss
8.1
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.8%
EPSS 2.8% chance of exploitation in 30 days, percentile 86%
public exploits
0
none known

Summary

PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pathname.

Patch / fix

  • packagist phpmailer/phpmailer 6.5.0
  • bitnami phpmailer 6.5.0
  • phpmailer_project phpmailer 6.5.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-34551 updated cvss 9.8

phpmailer: remote code execution if lang_path is untrusted data and has a UNC pathname

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.80% chance of exploitation in the next 30 days, higher than 86% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
GitHub 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 5.1 AV:N/AC:H/Au:N/C:P/I:P/A:P
OSV 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
packagist phpmailer/phpmailer
<6.5.0
6.5.0
bitnami phpmailer
<6.5.0
6.5.0

Classification

Weakness
  • CWE-434 Unrestricted Upload of File with Dangerous Type
  • CWE-94 Improper Control of Generation of Code

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.