packagist package reportIs phpmailer/phpmailer safe ? 14 known vulnerabilities, worst severity CRITICAL.
// reach 0 direct dependencies
none carry a known advisory
0 packages depend on it
dependents not yet indexed for this ecosystem
// ai model usage Tracked for PyPI packages. HuggingFace models declare Python dependencies, so packagist packages are not covered.
cvss severity band, no base score published
epss chance of exploitation in 30 days, 88th percentile of all CVEs
xyz score CyberXYZ composite out of 10
fig. 01 — GHSA-m298-fh5c-jc66, the advisory selected below
// 14 advisories GHSA-m298-fh5c-jc66 This is a reintroduction of an earlier issue (CVE-2018-19296) by an unrelated bug fix in PHPMailer 6.1.8. An external file may be unexpectedly executable if it is used as a path to an attachment file via PHP's support for .phar files. Exploitation requires that an attacker is able to provide an unfiltered path to a file to attach, or to trick calling code into generating one. See this article for CRIT GHSA-5f37-gxvh-23v6 The mailSend function in the default isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted Sender property. KEV CRIT GHSA-4pc3-96mx-wwc8 The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033. CRIT GHSA-6h78-85v2-mmch PHPMailer before 1.7.4, when configured to use sendmail, allows remote attackers to execute arbitrary shell commands via shell metacharacters in the SendmailSend function in class.phpmailer.php. HIGH GHSA-398j-f7m7-795j Arbitrary additional email headers can be injected via crafted From or Sender headers. HIGH GHSA-v5c9-mmw9-829q html2text.php in Chuggnutt HTML to Text Converter, as used in PHPMailer before 5.2.10, RoundCube Webmail (roundcubemail) 0.2-1.alpha and 0.2-3.beta, Mahara, and AtMail Open 1.03, allows remote attackers to execute arbitrary code via crafted input that is processed by the preg_replace function with the eval switch. HIGH GHSA-7q44-r25x-wm4q PHPMailer 6.4.1 contains a possible remote code execution vulnerability through the $lang_path parameter of the setLanguage() method. If the $lang_path parameter is passed unfiltered from user input, it can be set to a UNC path, and if an attacker is also able to create a remote mount on the server that the UNC path points to, a script file under their control may be executed. HIGH GHSA-77mr-wc79-m8j3 If a function is defined that has the same name as the default built-in email address validation scheme (php), it will be called in default configuration as when no validation scheme is provided, the default scheme's callable php was being called. If an attacker is able to inject such a function into the application (a much bigger issue), it will be called whenever an email address is validated, s HIGH GHSA-f7hx-fqxw-rvvj CWE-116: Incorrect output escaping. HIGH GHSA-7w4p-72j7-v7c2 PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing phar:// paths into addAttachment() and other functions that may receive unfiltered local paths, possibly leading to RCE. See this article for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as phar://. Reported by Sehun Oh HIGH Show all 14 advisories // impact This is a reintroduction of an earlier issue (CVE-2018-19296) by an unrelated bug fix in PHPMailer 6.1.8. An external file may be unexpectedly executable if it is used as a path to an attachment file via PHP's support for .phar files. Exploitation requires that an attacker is able to provide an unfiltered path to a file to attach, or to trick calling code into generating one. See this article for more info.
// patches This issue was patched in the PHPMailer 6.4.1 release. This release also implements stricter filtering for attachment paths; paths that look like any kind of URL are rejected.
// workarounds Validate paths to loaded files using the same pattern as used in isPermittedPath() before using them in any PHP file function, such as file_exists. This method can't be used directly because it is protected, but you can implement the same thing in calling code. Note that this should be applied to all user-supplied paths passed into such functions; it's not a problem specific to PHPMailer.
// credit This issue was found by Fariskhi Vidyan , reported and managed via Tidelift.
Checked 2026-11-07 at 22:18 UTC. The most recent advisory here was published 2024-02-02. Updated continuously from NVD, GHSA, OSV and CNA feeds.
Think a verdict here is wrong? Tell us — we respond within 2 business days. Report an issue with this page