# Remote Code Execution vulnerability in PHPMailer 6.4.1 running on Windows

Advisory record · `GHSA-7q44-r25x-wm4q`

- **Identifiers:** `GHSA-7q44-r25x-wm4q` · `BIT-phpmailer-2021-34551` · `CVE-2021-34551` · `PKSA-35kn-2ddp-d3p4`
- **State:** Confirmed
- **Severity:** CVSS 8.1 High
- **Critical:** No
- **Weakness (CWE):** [CWE-94](https://cwe.mitre.org/data/definitions/94.html) · [CWE-434](https://cwe.mitre.org/data/definitions/434.html)
- **Tags:** [Code injection](https://agentprime.io/advisories/tag/code-injection.md) · [Unrestricted file upload](https://agentprime.io/advisories/tag/file-upload.md)
- **Published:** 22 Jun 2021
- **Updated:** 17 Feb 2024
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 22 Jun 2021, 15:17 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `phpmailer/phpmailer` (Packagist): affected `<6.5.0`; fixed in `6.5.0`

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.1 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`, from GitHub Advisory Database

- **CISA KEV:** Not listed.
- **EPSS:** 0.028, the 86th percentile, on 17 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 16 Jun 2021, 15:58 UTC: [Published by the maintainers as a GitHub repository advisory](https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-7q44-r25x-wm4q)
- 31 Oct 2026, 14:31 UTC: First seen by agentprime
- 31 Oct 2026, 14:31 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-7q44-r25x-wm4q)

## Sources

- [GitHub Advisory Database: GHSA-7q44-r25x-wm4q](https://github.com/advisories/GHSA-7q44-r25x-wm4q)
- [OSV: GHSA-7q44-r25x-wm4q](https://osv.dev/vulnerability/GHSA-7q44-r25x-wm4q)
- <https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-7q44-r25x-wm4q>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-34551>
- <https://github.com/PHPMailer/PHPMailer/commit/acd264bf17ff4ac5c915f0d4226dce8a9ea70bc3>
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2021-34551.yaml>
- <https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md>
- <https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-7q44-r25x-wm4q>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-7q44-r25x-wm4q/>. Everything for agents: <https://agentprime.io/llms.txt>.
