{"id":"CVE-2020-36326","aliases":["BIT-phpmailer-2020-36326","BIT-wordpress-2020-36326","BIT-wordpress-multisite-2020-36326","DEBIAN-CVE-2020-36326","EUVD-2021-1129","GHSA-m298-fh5c-jc66","UBUNTU-CVE-2020-36326"],"status":"published","title":"Object injection in PHPMailer/PHPMailer","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.03095,"percentile":0.8792,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-502","CWE-641"],"published":"2021-04-28T02:21:53Z","modified":"2026-10-26T12:02:49Z","fixes":[{"ecosystem":"Packagist","package":"phpmailer/phpmailer","fixed_in":["6.4.1"],"sources":["ghsa","osv"]},{"ecosystem":"Bitnami","package":"phpmailer","fixed_in":["6.4.1"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"wordpress","fixed_in":["3.7.36","3.8.36","3.9.34","4.0.33","4.1.33","4.2.30","4.3.26","4.4.25","4.5.24","4.6.21","4.7.21","4.8.17","4.9.18","5.0.13","5.1.10","5.2.11","5.3.8","5.4.6","5.5.5","5.6.4","5.7.2"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"wordpress-multisite","fixed_in":["3.7.36","3.8.36","3.9.34","4.0.33","4.1.33","4.2.30","4.3.26","4.4.25","4.5.24","4.6.21","4.7.21","4.8.17","4.9.18","5.0.13","5.1.10","5.2.11","5.3.8","5.4.6","5.5.5","5.6.4","5.7.2"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"libphp-phpmailer","fixed_in":["6.2.0-2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"libphp-phpmailer","fixed_in":["6.2.0-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"libphp-phpmailer","fixed_in":["6.2.0-2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"phpmailer/phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.8"},{"fixed":"6.4.1"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"phpmailer","ranges":[{"type":"SEMVER","events":[{"introduced":"6.1.8"},{"fixed":"6.4.1"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"wordpress","ranges":[{"type":"SEMVER","events":[{"introduced":"3.7.0"},{"fixed":"3.7.36"},{"introduced":"3.8.0"},{"fixed":"3.8.36"},{"introduced":"3.9.0"},{"fixed":"3.9.34"},{"introduced":"4.0.0"},{"fixed":"4.0.33"},{"introduced":"4.1.0"},{"fixed":"4.1.33"},{"introduced":"4.2.0"},{"fixed":"4.2.30"},{"introduced":"4.3.0"},{"fixed":"4.3.26"},{"introduced":"4.4.0"},{"fixed":"4.4.25"},{"introduced":"4.5.0"},{"fixed":"4.5.24"},{"introduced":"4.6.0"},{"fixed":"4.6.21"},{"introduced":"4.7.0"},{"fixed":"4.7.21"},{"introduced":"4.8.0"},{"fixed":"4.8.17"},{"introduced":"4.9.0"},{"fixed":"4.9.18"},{"introduced":"5.0.0"},{"fixed":"5.0.13"},{"introduced":"5.1.0"},{"fixed":"5.1.10"},{"introduced":"5.2.0"},{"fixed":"5.2.11"},{"introduced":"5.3.0"},{"fixed":"5.3.8"},{"introduced":"5.4.0"},{"fixed":"5.4.6"},{"introduced":"5.5.0"},{"fixed":"5.5.5"},{"introduced":"5.6.0"},{"fixed":"5.6.4"},{"introduced":"5.7.0"},{"fixed":"5.7.2"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"wordpress-multisite","ranges":[{"type":"SEMVER","events":[{"introduced":"3.7.0"},{"fixed":"3.7.36"},{"introduced":"3.8.0"},{"fixed":"3.8.36"},{"introduced":"3.9.0"},{"fixed":"3.9.34"},{"introduced":"4.0.0"},{"fixed":"4.0.33"},{"introduced":"4.1.0"},{"fixed":"4.1.33"},{"introduced":"4.2.0"},{"fixed":"4.2.30"},{"introduced":"4.3.0"},{"fixed":"4.3.26"},{"introduced":"4.4.0"},{"fixed":"4.4.25"},{"introduced":"4.5.0"},{"fixed":"4.5.24"},{"introduced":"4.6.0"},{"fixed":"4.6.21"},{"introduced":"4.7.0"},{"fixed":"4.7.21"},{"introduced":"4.8.0"},{"fixed":"4.8.17"},{"introduced":"4.9.0"},{"fixed":"4.9.18"},{"introduced":"5.0.0"},{"fixed":"5.0.13"},{"introduced":"5.1.0"},{"fixed":"5.1.10"},{"introduced":"5.2.0"},{"fixed":"5.2.11"},{"introduced":"5.3.0"},{"fixed":"5.3.8"},{"introduced":"5.4.0"},{"fixed":"5.4.6"},{"introduced":"5.5.0"},{"fixed":"5.5.5"},{"introduced":"5.6.0"},{"fixed":"5.6.4"},{"introduced":"5.7.0"},{"fixed":"5.7.2"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.2.0-2"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.2.0-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.2.0-2"}]}]},{"source":"osv","ecosystem":"Packagist","package":"phpmailer/phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.8"},{"fixed":"6.4.1"}]}],"versions":["v6.1.8","v6.2.0","v6.3.0","v6.4.0"]}],"products":[{"vendor":"phpmailer_project","product":"phpmailer"},{"vendor":"wordpress","product":"wordpress"}],"references":[{"url":"https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","advisory","fix","web","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-m298-fh5c-jc66","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36326","tags":["web","advisory"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2020-36326.yaml","tags":["web"]},{"url":"https://github.com/PHPMailer/PHPMailer/releases/tag/v6.4.1","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT","tags":["web"]},{"url":"https://github.com/advisories/GHSA-m298-fh5c-jc66"},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-36326","tags":["advisory"]},{"url":"https://github.com/PHPMailer/PHPMailer","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2020-36326","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-36326","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2021-04-28T02:21:53Z","modified":"2024-08-04T17:23:10.518Z","updated_at":"2026-11-02T14:35:55.128961Z"}],"euvd":[{"id":"EUVD-2021-1129","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2021-04-28T02:21:53Z","modified":"2024-08-04T17:23:10Z","updated_at":"2026-11-03T03:07:03.484914Z"}],"ghsa":[{"id":"GHSA-m298-fh5c-jc66","title":"Object injection in PHPMailer/PHPMailer","description":"### Impact\nThis 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](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info.\n\n### Patches\nThis 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.\n\n### Workarounds\nValidate paths to loaded files using the same pattern as used in [`isPermittedPath()`](https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L1815) 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.\n\n### Credit\nThis issue was found by [Fariskhi Vidyan](https://github.com/farisv), reported and managed via Tidelift.","status":"published","published":"2021-05-04T17:42:13Z","modified":"2026-07-21T13:42:48Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502","CWE-641"],"updated_at":"2026-11-02T14:40:49.410128Z"}],"nvd":[{"id":"CVE-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2021-04-28T03:15:07.4Z","modified":"2026-06-17T03:15:18.88Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:06:39.25999Z"}],"osv":[{"id":"CVE-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2021-04-28T03:15:07.4Z","modified":"2026-10-24T10:50:06.316669233Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:16.936975Z"},{"id":"DEBIAN-CVE-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2021-04-28T03:15:07.4Z","modified":"2026-10-26T12:02:49.21454823Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:34.019707Z"},{"id":"GHSA-m298-fh5c-jc66","title":"Object injection in PHPMailer/PHPMailer","description":"### Impact\nThis 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](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info.\n\n### Patches\nThis 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.\n\n### Workarounds\nValidate paths to loaded files using the same pattern as used in [`isPermittedPath()`](https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L1815) 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.\n\n### Credit\nThis issue was found by [Fariskhi Vidyan](https://github.com/farisv), reported and managed via Tidelift.","status":"published","published":"2021-05-04T17:42:13Z","modified":"2026-07-21T14:00:32.800777724Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502","CWE-641"],"updated_at":"2026-11-02T15:46:51.10002Z"},{"id":"UBUNTU-CVE-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"withdrawn","published":"2021-04-28T03:15:00Z","modified":"2025-07-16T07:41:37.533454Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:25.179924Z"},{"id":"BIT-phpmailer-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2024-03-06T11:01:49.692Z","modified":"2026-09-08T08:48:24.67929559Z","updated_at":"2026-11-02T15:28:34.724063Z"},{"id":"BIT-wordpress-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2024-03-06T11:11:16.907Z","modified":"2026-09-08T08:48:22.463287554Z","updated_at":"2026-11-02T15:28:36.104787Z"},{"id":"BIT-wordpress-multisite-2020-36326","description":"PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname. NOTE: this is similar to CVE-2018-19296, but arose because 6.1.8 fixed a functionality problem in which UNC pathnames were always considered unreadable by PHPMailer, even in safe contexts. As an unintended side effect, this fix eliminated the code that blocked addAttachment exploitation.","status":"published","published":"2024-03-06T11:11:07.045Z","modified":"2026-09-08T08:48:21.651749922Z","updated_at":"2026-11-02T15:28:36.455807Z"}]}}
