Document Title: =============== Facebook Ads Pixel - (sendcodebymail) CSRF Vulnerability Date: ===== 2016-10-12 References: =========== http://www.vulnerability-lab.com/get_content.php?id=1768 VL-ID: ===== 1768 Common Vulnerability Scoring System: ==================================== 3.1 Vulnerability Class: ==================== Cross Site Request Forgery Introduction: ============= Facebook is a corporation and online social networking service headquartered in Menlo Park, California, in the United States. Its website was launched on February 4, 2004, by Mark Zuckerberg with his Harvard College roommates and fellow students Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes. The founders had initially limited the websites membership to Harvard students, but later expanded it to colleges in the Boston area, the Ivy League, and Stanford University. It gradually added support for students at various other universities and later to high-school students. Since 2006, anyone who is at least 13 years old was allowed to become a registered user of the website, though the age requirement may be higher depending on applicable local laws. Its name comes from the face book directories often given to American university students. (Copy of the Homepage: https://en.wikipedia.org/wiki/Facebook ) Abstract: ========= The vulnerability laboratory core research Team discovered a client-side cross site request forgery web vulnerability in the official facebook ads pixel core web-application. Report-Timeline: ================ 2016-10-13: Public Disclosure (Vulnerability Laboratory) Status: ======== Published Affected Products: ================== Exploitation-Technique: ======================= Remote Severity: ========= Medium Details: ======== A client-side cross site request forgery web vulnerability has been discovered in the official facebook ads pixel core web-application. The vulnerability allows remote attacker to manipulate client-side web-application to browser requests to unauthorized execute application functions. The vulnerability is located in the form GET method request of the vulnerable `/ads/pixels/sendcodebymail/` module. Remote attackers with low privileged web-application user accounts are able to inject own malicious script codes to unauthorized execute application functions with valid session credentials. The request method to execute is GET and the attack vector is located on the client-side of the facebook core online service web-application. Regular the web-application protects each request with a csrf token and secure session validation. In case of the issue the implementation is missing and allows active exploitation of the issue against target users. The security risk of the cross site web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.1. Exploitation of the cross site request forgery web vulnerability requires no privileged web application user account and low or medium user interaction. Successful exploitation results in client-side account theft by hijacking, client-side phishing, client-side session credential manipulation, client-side external redirects and non-persistent manipulation of affected or connected service modules. Request Method(s): [+] GET Vulnerable Module(s): [+] ./ads/pixels/sendcodebymail/ (sendcodebymail) Vulnerable Parameter(s): [+] ?personal_message=x&pixel_id=x&recipients[0]=test23%40evolution-sec.com Proof of Concept: ================= The cross site request forgery vulnerability can be exploited by remote attackers without privileged web-application user account and with low user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. PoC: --- PoC Session Logs [GET] --- Status: 200[OK] GET https://www.facebook.com/ads/pixels/sendcodebymail/?personal_message=Test%20message%20&pixel_id=1716466661898295&recipients[0]=test23%40evolution-sec.com Mime Type[text/html] Request Headers: Host[www.facebook.com] User-Agent[Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[en-US,en;q=0.5] Accept-Encoding[gzip, deflate, br] Cookie[datr= Connection[keep-alive] Response Headers: Expires[Sat, 01 Jan 2000 00:00:00 GMT] Cache-Control[private, no-cache, no-store, must-revalidate] content-security-policy[default-src * data: blob:;script-src *.facebook.com *.fbcdn.net *.facebook.net *.google-analytics.com *.virtualearth.net *.google.com 127.0.0.1:* *.spotilocal.com:* 'unsafe-inline' 'unsafe-eval' fbstatic-a.akamaihd.net fbcdn-static-b-a.akamaihd.net *.atlassolutions.com blob:;style-src * 'unsafe-inline' data:;connect-src *.facebook.com *.fbcdn.net *.facebook.net *.spotilocal.com:* *.akamaihd.net wss://*.facebook.com:* https://fb.scanandcleanlocal.com:* *.atlassolutions.com attachment.fbsbx.com blob:;] Pragma[no-cache] public-key-pins-report-only[max-age=500; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E="; pin-sha256="q4PO2G2cbkZhZ82+JgmRUyGMoAeozA+BSXVXQWB8XWQ="; report-uri="http://reports.fb.com/hpkp/"] Strict-Transport-Security[max-age=15552000; preload] x-xss-protection[0] x-content-type-options[nosniff] Content-Type[text/html] x-fb-debug[YxuET0mQxjPWzylTjrlSPIxdgT+GY5QgOQOkrGMmnRHASRhjS/nHrnqEn545+IR5/8gEuAGJ7bxdvuqgWJ8Q7Q==] Content-Length[0] X-Firefox-Spdy[h2] Reference(s): https://www.facebook.com/ https://www.facebook.com/ads/ https://www.facebook.com/ads/pixels/ https://www.facebook.com/ads/pixels/sendcodebymail/ https://www.facebook.com/ads/pixels/sendcodebymail/?personal_message= Risk: ===== The security risk of the cross site request forgery web vulnerability in the facebook core application is estimated as medium. Credits: ======== Vulnerability-Lab [research@vulnerability-lab.com] - https://www.vulnerability-lab.com/show.php?user=Vulnerability-Lab Disclaimer: =========== The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability Labs or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental or consequential damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data. We have no need for criminal activities or membership requests. We do not publish advisories or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails, phone numbers, conversations or anything else to journalists, investigative authorities or private individuals. Domains: www.vulnerability-lab.com - www.vulnerability-db.com - www.evolution-sec.com Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Any modified copy or reproduction, including partially usages, of this file, resources or information requires authorization from Vulnerability Laboratory. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list, modify, use or edit our material contact (admin@) to get an ask permission. Copyright © 2018 | Vulnerability Laboratory - [Evolution Security GmbH]™