Every CVE Search/ Get API key

CVE-2012-0796

PHPMailer vulnerable to email header injection

4.0 MediumFix available

CVE-2012-0796 is a medium vulnerability (CVSS 4.0) in Moodle, published February 29, 2012. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.68%, the 76th percentile. Fixed in phpmailer/phpmailer 2.2.1.

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.

Exploit likelihood

1.68%Up 0.5 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 4.0

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.

Record
CVE-2012-0796
CVSS 2.0
4.0 MediumAV:N/AC:L/Au:S/C:N/I:P/A:N
Weakness
CWE-94
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2012-0796
Updated
2026-11-02
EUVDEUVD-2022-7002 No score

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.

Record
EUVD-2022-7002
Updated
2026-11-03
GitHub AdvisoriesGHSA-398j-f7m7-795j No score

PHPMailer vulnerable to email header injection

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:

Record
GHSA-398j-f7m7-795j
Weakness
CWE-94
Updated
2026-11-02
OSVGHSA-398j-f7m7-795j No score

PHPMailer vulnerable to email header injection

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:

Record
GHSA-398j-f7m7-795j
Weakness
CWE-94
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
phpmailer/phpmailer
Packagist
before 2.2.1
2.2.1
moodle
Debian:6.0
before 1.9.9.dfsg2-2.1+squeeze3, plus listed versions
1.9.9.dfsg2-2.11.9.9.dfsg2-2.1+squeeze11.9.9.dfsg2-2.1+squeeze2
1.9.9.dfsg2-2.1+squeeze3

History

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, GitHub Advisories, NVD, OSV

References

MoveEnter Open