Closed Bug 620125 Opened 15 years ago Closed 15 years ago

Email Header Injection Vulnerability in Mozilla.org

Categories

(www.mozilla.org :: General, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neal, Assigned: dchanm+bugzilla)

References

()

Details

(Keywords: reporter-external, Whiteboard: [infrasec:input][ws:high])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Build Identifier: mozilla.org/causes/open/submit/index.php is vulnerable to email header injection via the $name/$email variables. It's possible for an attacker to add arbitrary headers via a custom POST request: that allows a malicious user to send spam via Mozilla's servers. Reproducible: Always Steps to Reproduce: 1. Craft malicious POST request to mozilla.org/causes/open/submit/index.php 2. Done!
A similar vulnerability can also be found in mozilla.org/contribute/email/index.php. The only vulnerable variable there is $email and it's protected by a regular expression, which limits the ways an injection attack can work. However, it is possible to provide your email address as aa%0D%0Acc: somename<example@example.com which adds a CC header to the email.
Assignee: infrasec → nobody
Group: mozilla-confidential → websites-security
Component: Infrastructure Security: Web Security → other.mozilla.org
Product: mozilla.org → Websites
QA Contact: clyon → other-mozilla-org
Whiteboard: [infrasec:input][ws:high]
Component: other.mozilla.org → www.mozilla.org
QA Contact: other-mozilla-org → www-mozilla-org
(In reply to comment #1) > A similar vulnerability can also be found in > mozilla.org/contribute/email/index.php. The only vulnerable variable there is > $email and it's protected by a regular expression, which limits the ways an > injection attack can work. However, it is possible to provide your email > address as > > aa%0D%0Acc: somename<example@example.com > > which adds a CC header to the email. The contribute one is filed as bug #619929 . The fix is waiting to be pushed. I'll look into the causes one.
Assignee: nobody → dchan
Attached patch proposed patch (obsolete) — — Splinter Review
Copied over the validate_email from contribute Added validate_name which checks for control characters
Attachment #498830 - Flags: review?(reed)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 498830 [details] [diff] [review] proposed patch Can we go with a whitelist for name rather than a blacklist? As it stands, couldn't you also include \n or \r in the name, allowing other e-mail addresses via that field?
Attachment #498830 - Flags: review?(reed) → review-
Attached patch rev v2 — — Splinter Review
Rewrite validate_name to look for word, digits, space
Attachment #498830 - Attachment is obsolete: true
Attachment #498852 - Flags: review?(reed)
Attachment #498852 - Attachment is patch: true
Attachment #498852 - Attachment mime type: application/octet-stream → text/plain
The 'What is an open web?' pages have been taken down (see bug 616580). I assume that fixes this issue? http://www.mozilla.org/causes/open/
Correct. And bug 619929 apparently covers the issue in /contribute/email/, so it sounds like this bug can be marked as resolved. :)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Comment on attachment 498852 [details] [diff] [review] rev v2 Clearing review flag since this bug is resolved
Attachment #498852 - Flags: review?(reed)
Flags: sec-bounty+
Group: websites-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: