Miggo Logo

CVE-2018-14716:
SEOmatic plugin for Craft CMS SSTI Vulnerability

7.5

CVSS Score

Basic Information

EPSS Score
-
Published
5/13/2022
Updated
10/6/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
nystudio107/craft-seomaticcomposer< 3.1.43.1.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability root cause lies in two key areas:

  1. In GlobalVars.php, the canonicalUrl was directly configured with a Twig template that incorporated user-controlled pathInfo. This allowed attackers to inject Twig code via crafted URIs.
  2. In DynamicMeta.php's getLocalizedUrls method, the URL processing lacked critical sanitization steps (query string stripping and protocol enforcement), enabling the injected Twig code to execute. The patch explicitly addresses both points by replacing the dynamic Twig template with a safe helper method and adding sanitization layers in the URL generation logic.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* S*rv*r Si** T*mpl*t* Inj**tion (SSTI) w*s *is*ov*r** in t** S*Om*ti* plu*in ***or* *.*.* *or *r**t *MS, ****us* r*qu*sts t**t *on't m*t** *ny *l*m*nts in*orr**tly **n*r*t* t** **noni**lUrl, *n* **n l*** to *x**ution o* Twi* *o**.

Reasoning

T** vuln*r**ility root **us* li*s in two k*y *r**s: *. In *lo**lV*rs.p*p, t** **noni**lUrl w*s *ir**tly *on*i*ur** wit* * Twi* t*mpl*t* t**t in*orpor*t** us*r-*ontroll** p*t*In*o. T*is *llow** *tt**k*rs to inj**t Twi* *o** vi* *r**t** URIs. *. In *yn