Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpmailer/phpmailer
  4. ›
  5. CVE-2020-36326

CVE-2020-36326: Object injection in PHPMailer/PHPMailer

May 4, 2021 (updated July 21, 2026)

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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2020-36326.yaml
  • github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9
  • github.com/PHPMailer/PHPMailer/releases/tag/v6.4.1
  • github.com/PHPMailer/PHPMailer/security/advisories/GHSA-m298-fh5c-jc66
  • github.com/advisories/GHSA-m298-fh5c-jc66
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT
  • nvd.nist.gov/vuln/detail/CVE-2020-36326

Code Behaviors & Features

Detect and mitigate CVE-2020-36326 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.1.8 before 6.4.1

Fixed versions

  • 6.4.1

Solution

Upgrade to version 6.4.1 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data
  • CWE-641: Improper Restriction of Names for Files and Other Resources

Source file

packagist/phpmailer/phpmailer/CVE-2020-36326.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 12:16:21 +0000.