CVE-2020-12790:
SEOmatic for CraftCMS allows Server-Side Template Injection
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.63102%
CWE
Published
5/24/2022
Updated
8/21/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
nystudio107/craft-seomatic | composer | < 3.2.49 | 3.2.49 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper URL sanitization in DynamicMeta.php's sanitizeUrl method. The pre-patch code only used html_entity_decode and strip_tags, but lacked urldecode. This allowed attackers to supply URL-encoded Twig payloads (e.g., %7B%7Bmalicious_code%7D%7D) that would survive sanitization and be parsed as valid templates. The critical fix in 3.2.49 added urldecode() before sanitization, confirming this as the vulnerable function. The CWE-74 classification and advisory details about URL sanitization flaws further support this conclusion.