CVE-2021-44618

9.8 CRITICAL

📋 TL;DR

This CVE describes a Server-side Template Injection (SSTI) vulnerability in Nystudio107 Seomatic plugin for Craft CMS. Attackers can exploit this by manipulating the Host header to inject malicious template code, potentially leading to remote code execution. All systems running vulnerable versions of the Seomatic plugin are affected.

💻 Affected Systems

Products:
  • Nystudio107 Seomatic plugin for Craft CMS
Versions: Versions before 3.4.12
Operating Systems: All operating systems running Craft CMS
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all Craft CMS installations using vulnerable Seomatic plugin versions. The vulnerability is in the URL helper component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, and lateral movement within the network.

🟠

Likely Case

Remote code execution allowing attackers to execute arbitrary commands on the server, potentially leading to data exfiltration or further system compromise.

🟢

If Mitigated

Limited impact with proper input validation and security controls, potentially only causing denial of service or information disclosure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires only HTTP request manipulation. The vulnerability is in a widely used plugin, making it attractive for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.4.12 and later

Vendor Advisory: https://github.com/nystudio107/craft-seomatic/releases/tag/3.4.12

Restart Required: No

Instructions:

1. Update Seomatic plugin to version 3.4.12 or later via Craft CMS admin panel or Composer. 2. Verify the update was successful by checking the plugin version. 3. Clear any caches if necessary.

🔧 Temporary Workarounds

Host Header Validation

all

Implement web application firewall rules or middleware to validate and sanitize Host headers

Input Sanitization

all

Add custom validation for all user-controlled inputs in template rendering

🧯 If You Can't Patch

  • Implement strict input validation for Host headers at the web server or application level
  • Deploy web application firewall with SSTI protection rules

🔍 How to Verify

Check if Vulnerable:

Check Seomatic plugin version in Craft CMS admin panel or via Composer: composer show nystudio107/craft-seomatic

Check Version:

composer show nystudio107/craft-seomatic | grep versions

Verify Fix Applied:

Verify Seomatic plugin version is 3.4.12 or higher and check the commit hash matches the fix

📡 Detection & Monitoring

Log Indicators:

  • Unusual Host header values in web server logs
  • Multiple failed template rendering attempts
  • Suspicious PHP/system commands in logs

Network Indicators:

  • HTTP requests with manipulated Host headers containing template syntax
  • Unusual outbound connections from web server

SIEM Query:

source="web_server_logs" AND (Host:*{{* OR Host:*}}* OR Host:*$*{*)

🔗 References

📤 Share & Export