CVE-2012-0796 json
PHPMailer vulnerable to email header injection
published 2012-07-17 14 y ago modified 2026-06-16 4 mo ago also GHSA-398j-f7m7-795j , EUVD-2022-7002
- cvss
- 4.0
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.7%
- EPSS 1.7% chance of exploitation in 30 days, percentile 77%
- public exploits
- 0
- none known
Summary
class.phpmailer.php in the PHPMailer library, as used in Moodle 1.9.x before 1.9.16, 2.0.x before 2.0.7, 2.1.x before 2.1.4, and 2.2.x before 2.2.1 and other products, allows remote authenticated users to inject arbitrary e-mail headers via vectors involving a crafted (1) From: or (2) Sender: header.
Patch / fix
- packagist phpmailer/phpmailer 2.2.1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2012-0796 updated cvss 4.3
moodle: multiple security fixes in 2.2.1, 2.1.4, 2.0.7, 1.9.16
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.68% chance of exploitation in the next 30 days, higher than 77% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 4.0 | AV:N/AC:L/Au:S/C:N/I:P/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | phpmailer/phpmailer | <2.2.1 |
2.2.1 |
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
git.moodle.org
/gw?p=moodle.git&a=commit&h=62988bf0bbc73df655f51884aaf1f523928abff9
web
-
debian.org
/security/2012/dsa-2421
vendor-advisory, web
-
moodle.org
/mod/forum/discuss.php?d=194015
web, vendor-advisory
- git.moodle.org /gw?p=moodle.git%3Ba=commit%3Bh=62988bf0bbc73df655f51884aaf1f523928abff9
-
bugzilla.redhat.com
/show_bug.cgi?id=783532
web
-
github.com
/PHPMailer/PHPMailer/security/advisories/GHSA-398j-f7m7-795j
web
-
nvd.nist.gov
/vuln/detail/CVE-2012-0796
advisory
-
github.com
/PHPMailer/PHPMailer
package
Sources
- CVE List CVE-2012-0796
- GitHub Advisory GHSA-398j-f7m7-795j
- NVD CVE-2012-0796
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.