NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐘 Packagist
Not in CISA KEV

CVE-2012-0796 — phpmailer

CVE-2012-0796 is a Code Injection vulnerability in phpmailer/phpmailer. A fix is available for phpmailer/phpmailer — see the affected versions and patch details below.

PHPMailer vulnerable to email header injection

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 3, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs77th percentile — riskier than 77% of all scored CVEsHighest risk
0.00%0.73%1.45%2.18%0.2%1.7%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐘phpmailer/phpmailer

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Impact

Arbitrary additional email headers can be injected via crafted From or Sender headers.

Patches

Fixed in 2.2.1

Workarounds

Filter user-supplied values prior to using them in From or Sender properties.

References

https://nvd.nist.gov/vuln/detail/CVE-2012-0796

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistphpmailer/phpmailerall versions2.2.1composer require phpmailer/phpmailer:^2.2.1

Affected Products

1 product · 27 configurations
Application
moodlemoodle
27 versions
1.9.11.9.21.9.31.9.41.9.51.9.61.9.71.9.81.9.91.9.101.9.111.9.12

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpmailer/phpmailer, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update phpmailer/phpmailer to 2.2.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2012-0796 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

### Impact Arbitrary additional email headers can be injected via crafted From or Sender headers. ### Patches Fixed in 2.2.1 ### Workarounds Filter user-supplied values prior to using them in From or Sender properties. ### References https://nvd.nist.gov/vuln/detail/CVE-2012-0796 ### For more information If you have any questions or comments about this advisory: * Open a private issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)
O3 Security · Impact-Aware SCA

Is CVE-2012-0796 in your dependencies?

Find it across Packagist, including transitive dependencies.

CVE-2012-0796: phpmailer — Fixed in 2.2.1