CVE-2012-0796: Code Injection

Published Jul 17, 2012
·
Updated

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

Other sources

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.

Affected Software

28 affected componentsFixes available
composer/phpmailer/phpmailer<2.2.1
2.2.1
Moodle moodle=1.9.1
Moodle moodle=1.9.2
Moodle moodle=1.9.3
Moodle moodle=1.9.4
Moodle moodle=1.9.5
Moodle moodle=1.9.6
Moodle moodle=1.9.7
Moodle moodle=1.9.8
Moodle moodle=1.9.9
Moodle moodle=1.9.10
Moodle moodle=1.9.11
Moodle moodle=1.9.12
Moodle moodle=1.9.13
Moodle moodle=1.9.14
Moodle moodle=1.9.15
Moodle moodle=2.0.0
Moodle moodle=2.0.1
Moodle moodle=2.0.2
Moodle moodle=2.0.3
Moodle moodle=2.0.4
Moodle moodle=2.0.5
Moodle moodle=2.0.6
Moodle moodle=2.1.0
Moodle moodle=2.1.1
Moodle moodle=2.1.2
Moodle moodle=2.1.3
Moodle moodle=2.2.0

Event History

Jul 17, 2012
CVE Published
via MITRE·10:00 AM
Data Sourced
via MITRE·10:00 AM
Description
Oct 6, 2022
Advisory Published
09:25 PM

Frequently Asked Questions

1

What is the severity of CVE-2012-0796?

CVE-2012-0796 has been classified as a high severity vulnerability due to its ability to allow arbitrary email header injection.

2

How do I fix CVE-2012-0796?

To fix CVE-2012-0796, upgrade to PHPMailer version 2.2.1 or later.

3

Which versions are affected by CVE-2012-0796?

CVE-2012-0796 affects multiple versions of Moodle, specifically versions from 1.9.1 up to 2.0.6.

4

What is the impact of CVE-2012-0796?

The impact of CVE-2012-0796 is that it allows attackers to inject arbitrary additional email headers, potentially leading to phishing attacks or email spoofing.

5

Are there any workarounds for CVE-2012-0796?

A recommended workaround for CVE-2012-0796 is to filter user-supplied values before using them in From or Sender properties.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203