Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:composer/phpmailer/phpmailer@5.2.5
purl pkg:composer/phpmailer/phpmailer@5.2.5
Next non-vulnerable version 6.5.0
Latest non-vulnerable version 6.5.0
Risk 10.0
Vulnerabilities affecting this package (10)
Vulnerability Summary Fixed by
VCID-16kp-5zpw-fbha
Aliases:
CVE-2020-13625
GHSA-f7hx-fqxw-rvvj
Insufficient output escaping of attachment names in PHPMailer ### Impact CWE-116: Incorrect output escaping. An attachment added like this (note the double quote within the attachment name, which is entirely valid): $mail->addAttachment('/tmp/attachment.tmp', 'filename.html";.jpg'); Will result in a message containing these headers: Content-Type: application/octet-stream; name="filename.html";.jpg" Content-Disposition: attachment; filename="filename.html";.jpg" The attachment will be named `filename.html`, and the trailing `";.jpg"` will be ignored. Mail filters that reject `.html` attachments but permit `.jpg` attachments may be fooled by this. Note that the MIME type itself is obtained automatically from the *source filename* (in this case `attachment.tmp`, which maps to a generic `application/octet-stream` type), and not the *name* given to the attachment (though these are the same if a separate name is not provided), though it can be set explicitly in other parameters to attachment methods. ### Patches Patched in PHPMailer 6.1.6 by escaping double quotes within the name using a backslash, as per RFC822 section 3.4.1, resulting in correctly escaped headers like this: Content-Type: application/octet-stream; name="filename.html\";.jpg" Content-Disposition: attachment; filename="filename.html\";.jpg" ### Workarounds Reject or filter names and filenames containing double quote (`"`) characters before passing them to attachment functions such as `addAttachment()`. ### References [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). [PHPMailer 6.1.6 release](https://github.com/PHPMailer/PHPMailer/releases/tag/v6.1.6) ### For more information If you have any questions or comments about this advisory: * Open an issue in [the PHPMailer repo](https://github.com/PHPMailer/PHPMailer/issues)
6.1.6
Affected by 2 other vulnerabilities.
VCID-44d3-4txm-cyc3
Aliases:
CVE-2021-34551
GHSA-7q44-r25x-wm4q
Remote Code Execution vulnerability in PHPMailer 6.4.1 running on Windows 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](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), 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. ### Impact Arbitrary code may be run by a remote attacker under the web server or PHP process running on Window hosts. ### Patches Mitigated in PHPMailer 6.5.0 by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. ### Workarounds Any of: * Ensure that calling code does not pass unfiltered user-supplied data to the `$lang_path` parameter of the `setLanguage()` method. * Block or filter the use of unknown UNC paths in this parameter (or altogether). * Ensure that unauthorised users do not have the ability to read from unknown remote servers via UNC paths. * Run on an OS that does not support UNC paths ### References [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [listensec.com](https://listensec.com) via Tidelift. ### For more information If you have any questions or comments about this advisory: * Open an issue in [PHPMailer](https://github.com/PHPMailer/PHPMailer) * [Email the maintainers](mailto:phpmailer@synchromedia.co.uk)
6.5.0
Affected by 0 other vulnerabilities.
VCID-7kvh-8w1t-2kej
Aliases:
CVE-2015-8476
GHSA-738m-f33v-qc2r
Multiple CRLF injection vulnerabilities allow attackers to inject arbitrary SMTP commands via CRLF sequences in an email address to the `validateAddress` function in `class.phpmailer.php` or SMTP command to the `sendCommand` function in `class.smtp.php`.
5.2.14
Affected by 8 other vulnerabilities.
VCID-cq4m-3q7u-cbg3
Aliases:
CVE-2016-10033
GHSA-5f37-gxvh-23v6
Remote code execution in PHPMailer ### Impact 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. ### Patches Fixed in 5.2.18 ### Workarounds Filter and validate user input before passing it to internal functions. ### References https://nvd.nist.gov/vuln/detail/CVE-2016-10033 Related to a follow-on issue in https://nvd.nist.gov/vuln/detail/CVE-2016-10045 ### For more information If you have any questions or comments about this advisory: * Open a private issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)
5.2.18
Affected by 7 other vulnerabilities.
VCID-f585-qf89-f7f3
Aliases:
CVE-2018-19296
GHSA-7w4p-72j7-v7c2
Object injection PHPMailer is vulnerable to an object injection attack.
5.2.27
Affected by 3 other vulnerabilities.
6.0.6
Affected by 3 other vulnerabilities.
VCID-jca1-hyks-kud3
Aliases:
CVE-2021-3603
GHSA-77mr-wc79-m8j3
PHPMailer untrusted code may be run from an overridden address validator 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, such as when calling `validateAddress()`. ### Impact Low impact – exploitation requires that an attacker can already inject code into an application, but it provides a trigger pathway. ### Patches This is patched in PHPMailer 6.5.0 by denying the use of simple strings as validator function names, which is a very minor BC break. ### Workarounds Inject your own email validator function. ### References Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/). [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603) ### For more information If you have any questions or comments about this advisory: * Open an issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer) * [Email us](mailto:phpmailer@synchromedia.co.uk).
6.5.0
Affected by 0 other vulnerabilities.
VCID-n13m-y4ks-euep
Aliases:
CVE-2008-5619
GHSA-v5c9-mmw9-829q
Improper Control of Generation of Code ('Code Injection') 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.
5.2.10
Affected by 9 other vulnerabilities.
VCID-xrtk-1rmg-7uca
Aliases:
CVE-2016-10045
GHSA-4pc3-96mx-wwc8
Remote code execution in PHPMailer ### Impact 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. This issue really emphasises that it's worth avoiding the built-in PHP `mail()` function entirely. ### Patches Fixed in 5.2.20 ### Workarounds Send via SMTP to localhost instead of calling the `mail()` function. ### References https://nvd.nist.gov/vuln/detail/CVE-2016-10045 See also https://nvd.nist.gov/vuln/detail/CVE-2016-10033 ### For more information If you have any questions or comments about this advisory: * Open a private issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)
5.2.20
Affected by 6 other vulnerabilities.
VCID-ywsv-ddhg-b7es
Aliases:
CVE-2017-5223
GHSA-4x5h-cr29-fhp6
Local File Disclosure PHPMailer's `msgHTML` method applies transformations to an HTML document to make it usable as an email message body. One of the transformations is to convert relative image URLs into attachments using a script-provided base directory. If no base directory is provided, it resolves to `/`, meaning that relative image URLs get treated as absolute local file paths and added as attachments.
5.2.22
Affected by 5 other vulnerabilities.
VCID-zju7-7wax-zfhz
Aliases:
CVE-2017-11503
GHSA-58mj-pw57-4vm2
XSS vulnerability in code example The `code_generator.phps` example does not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, so it is safe by default. There's also an undisclosed potential XSS vulnerability in the default exception handler (unused by default).
5.2.24
Affected by 4 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-16T21:51:39.850471+00:00 GitLab Importer Affected by VCID-n13m-y4ks-euep https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2008-5619.yml 38.4.0
2026-04-16T21:26:27.602968+00:00 GitLab Importer Affected by VCID-jca1-hyks-kud3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-3603.yml 38.4.0
2026-04-16T21:26:19.578092+00:00 GitLab Importer Affected by VCID-44d3-4txm-cyc3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-34551.yml 38.4.0
2026-04-16T21:04:22.283643+00:00 GitLab Importer Affected by VCID-16kp-5zpw-fbha https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2020-13625.yml 38.4.0
2026-04-16T21:01:14.329464+00:00 GitLab Importer Affected by VCID-cq4m-3q7u-cbg3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10033.yml 38.4.0
2026-04-16T21:01:14.005101+00:00 GitLab Importer Affected by VCID-xrtk-1rmg-7uca https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10045.yml 38.4.0
2026-04-16T20:50:16.314733+00:00 GitLab Importer Affected by VCID-f585-qf89-f7f3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2018-19296.yml 38.4.0
2026-04-16T20:37:26.045739+00:00 GitLab Importer Affected by VCID-zju7-7wax-zfhz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-11503.yml 38.4.0
2026-04-16T20:36:06.005303+00:00 GitLab Importer Affected by VCID-ywsv-ddhg-b7es https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-5223.yml 38.4.0
2026-04-16T20:33:14.185996+00:00 GitLab Importer Affected by VCID-7kvh-8w1t-2kej https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2015-8476.yml 38.4.0
2026-04-11T23:07:36.995338+00:00 GitLab Importer Affected by VCID-n13m-y4ks-euep https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2008-5619.yml 38.3.0
2026-04-11T22:39:20.773874+00:00 GitLab Importer Affected by VCID-jca1-hyks-kud3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-3603.yml 38.3.0
2026-04-11T22:39:11.499932+00:00 GitLab Importer Affected by VCID-44d3-4txm-cyc3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-34551.yml 38.3.0
2026-04-11T22:15:46.971603+00:00 GitLab Importer Affected by VCID-16kp-5zpw-fbha https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2020-13625.yml 38.3.0
2026-04-11T22:12:32.482152+00:00 GitLab Importer Affected by VCID-cq4m-3q7u-cbg3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10033.yml 38.3.0
2026-04-11T22:12:32.131510+00:00 GitLab Importer Affected by VCID-xrtk-1rmg-7uca https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10045.yml 38.3.0
2026-04-11T22:00:54.782639+00:00 GitLab Importer Affected by VCID-f585-qf89-f7f3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2018-19296.yml 38.3.0
2026-04-11T21:48:03.955806+00:00 GitLab Importer Affected by VCID-zju7-7wax-zfhz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-11503.yml 38.3.0
2026-04-11T21:46:39.368052+00:00 GitLab Importer Affected by VCID-ywsv-ddhg-b7es https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-5223.yml 38.3.0
2026-04-11T21:43:38.374307+00:00 GitLab Importer Affected by VCID-7kvh-8w1t-2kej https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2015-8476.yml 38.3.0
2026-04-02T23:15:56.029230+00:00 GitLab Importer Affected by VCID-n13m-y4ks-euep https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2008-5619.yml 38.1.0
2026-04-02T22:49:56.602063+00:00 GitLab Importer Affected by VCID-jca1-hyks-kud3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-3603.yml 38.1.0
2026-04-02T22:49:47.881484+00:00 GitLab Importer Affected by VCID-44d3-4txm-cyc3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-34551.yml 38.1.0
2026-04-02T22:27:59.970655+00:00 GitLab Importer Affected by VCID-16kp-5zpw-fbha https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2020-13625.yml 38.1.0
2026-04-02T22:24:57.987383+00:00 GitLab Importer Affected by VCID-cq4m-3q7u-cbg3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10033.yml 38.1.0
2026-04-02T22:24:57.666363+00:00 GitLab Importer Affected by VCID-xrtk-1rmg-7uca https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10045.yml 38.1.0
2026-04-02T22:13:57.154082+00:00 GitLab Importer Affected by VCID-f585-qf89-f7f3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2018-19296.yml 38.1.0
2026-04-02T22:01:57.972271+00:00 GitLab Importer Affected by VCID-zju7-7wax-zfhz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-11503.yml 38.1.0
2026-04-02T22:00:40.921715+00:00 GitLab Importer Affected by VCID-ywsv-ddhg-b7es https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-5223.yml 38.1.0
2026-04-02T21:57:45.686105+00:00 GitLab Importer Affected by VCID-7kvh-8w1t-2kej https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2015-8476.yml 38.1.0
2026-04-01T17:35:59.913457+00:00 GitLab Importer Affected by VCID-n13m-y4ks-euep https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2008-5619.yml 38.0.0
2026-04-01T17:07:52.999011+00:00 GitLab Importer Affected by VCID-jca1-hyks-kud3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-3603.yml 38.0.0
2026-04-01T17:07:43.751218+00:00 GitLab Importer Affected by VCID-44d3-4txm-cyc3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2021-34551.yml 38.0.0
2026-04-01T16:45:56.206409+00:00 GitLab Importer Affected by VCID-16kp-5zpw-fbha https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2020-13625.yml 38.0.0
2026-04-01T16:42:52.170586+00:00 GitLab Importer Affected by VCID-cq4m-3q7u-cbg3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10033.yml 38.0.0
2026-04-01T16:42:51.839110+00:00 GitLab Importer Affected by VCID-xrtk-1rmg-7uca https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2016-10045.yml 38.0.0
2026-04-01T16:31:26.914994+00:00 GitLab Importer Affected by VCID-f585-qf89-f7f3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2018-19296.yml 38.0.0
2026-04-01T16:19:10.256196+00:00 GitLab Importer Affected by VCID-zju7-7wax-zfhz https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-11503.yml 38.0.0
2026-04-01T16:17:51.282499+00:00 GitLab Importer Affected by VCID-ywsv-ddhg-b7es https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2017-5223.yml 38.0.0
2026-04-01T16:14:58.496937+00:00 GitLab Importer Affected by VCID-7kvh-8w1t-2kej https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/phpmailer/phpmailer/CVE-2015-8476.yml 38.0.0