{"id":"CVE-2012-0796","aliases":["GHSA-398j-f7m7-795j"],"kind":"cve","tier":"cold","status":"published","title":"PHPMailer vulnerable to email header injection","description":"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.","ai_summary":null,"severity":"medium","cvss":{"score":4,"version":"2.0","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:N","source":"NVD"},"scores":[{"score":4,"version":"2.0","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:N","source":"nvd"}],"cwe":["CWE-94"],"remote":true,"remote_unauth":false,"epss":{"score":0.01658,"percentile":0.77058,"date":"2026-11-29"},"kev":{"listed":false,"added":null,"due":null,"ransomware":null},"exploit":{"public":false,"exploitdb_ids":[]},"affected":[{"ecosystem":"Packagist","name":"phpmailer/phpmailer","affected":"< 2.2.1","fixed":["2.2.1"],"source":"osv"}],"affected_products":[{"vendor":"n/a","product":"n/a","versions":"","source":"nvd"}],"ai_versions":null,"mitigation":"Upgrade phpmailer/phpmailer to 2.2.1 or later.","technologies":[],"references":[{"url":"http://moodle.org/mod/forum/discuss.php?d=194015","kind":"vendor"},{"url":"http://www.debian.org/security/2012/dsa-2421","kind":"vendor"},{"url":"https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-398j-f7m7-795j","kind":"vendor"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2012-0796","kind":"vendor"},{"url":"http://git.moodle.org/gw?p=moodle.git%3Ba=commit%3Bh=62988bf0bbc73df655f51884aaf1f523928abff9","kind":"other"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=783532","kind":"other"},{"url":"https://git.moodle.org/gw?p=moodle.git&a=commit&h=62988bf0bbc73df655f51884aaf1f523928abff9","kind":"other"},{"url":"https://github.com/PHPMailer/PHPMailer","kind":"other"}],"workarounds":null,"vendors":["moodle"],"products":["moodle"],"cpes":["cpe:2.3:a:moodle:moodle:1.9.10:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.11:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.12:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.13:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.14:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.15:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.1:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.2:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.3:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.4:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.5:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.6:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.7:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.8:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:1.9.9:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.0:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.1:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.2:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.3:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.4:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.5:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.0.6:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.1.0:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.1.1:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.1.2:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.1.3:*:*:*:*:*:*:*","cpe:2.3:a:moodle:moodle:2.2.0:*:*:*:*:*:*:*"],"published_at":"2012-07-17T10:00:00.000Z","modified_at":"2026-06-16T23:38:16.640Z","promoted_at":null,"attribution":[{"source":"CVE Program","text":"CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation.","url":"https://www.cve.org/Legal/TermsOfUse"},{"source":"NVD","text":"This product uses data from the NVD API but is not endorsed or certified by the NVD.","url":"https://nvd.nist.gov/vuln/detail/CVE-2012-0796"},{"source":"OSV","text":"CC-BY 4.0","url":"https://osv.dev/vulnerability/GHSA-398j-f7m7-795j","license_url":"https://creativecommons.org/licenses/by/4.0/"}],"links":{"html":"https://flawdb.com/CVE-2012-0796","markdown":"https://flawdb.com/CVE-2012-0796.md","json":"https://flawdb.com/api/v1/entries/CVE-2012-0796"}}