CVE-2021-23267

7.6 HIGH

📋 TL;DR

This vulnerability allows authenticated developers in Crafter CMS Studio to execute arbitrary operating system commands through FreeMarker static methods. It affects Crafter CMS installations where developers have access to the Studio interface. The attack requires authenticated developer privileges but can lead to full server compromise.

💻 Affected Systems

Products:
  • Crafter CMS
Versions: Crafter CMS 3.1.x before 3.1.18
Operating Systems: All platforms running Crafter CMS
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Crafter Studio component. Requires developer authentication.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server takeover with attacker gaining root/admin privileges, data exfiltration, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Authenticated developers with malicious intent or compromised developer accounts executing commands to steal sensitive data, modify content, or disrupt services.

🟢

If Mitigated

Limited impact with proper access controls, developer vetting, and network segmentation preventing lateral movement.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated developer access. FreeMarker template injection leads to OS command execution.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Crafter CMS 3.1.18 and later

Vendor Advisory: https://docs.craftercms.org/en/3.1/security/advisory.html#cv-2022051603

Restart Required: Yes

Instructions:

1. Backup your Crafter CMS installation and database. 2. Download Crafter CMS 3.1.18 or later from official sources. 3. Follow upgrade instructions in documentation. 4. Restart Crafter CMS services. 5. Verify upgrade completed successfully.

🔧 Temporary Workarounds

Restrict Developer Access

all

Temporarily remove or restrict developer accounts until patching can be completed.

Network Segmentation

all

Isolate Crafter Studio instances from sensitive systems and limit outbound connections.

🧯 If You Can't Patch

  • Implement strict access controls and audit all developer activities
  • Deploy application firewalls to monitor and block suspicious FreeMarker template executions

🔍 How to Verify

Check if Vulnerable:

Check Crafter CMS version. If running 3.1.x before 3.1.18, system is vulnerable.

Check Version:

Check Crafter CMS admin interface or deployment logs for version information

Verify Fix Applied:

Verify Crafter CMS version is 3.1.18 or later and test that FreeMarker static method restrictions are in place.

📡 Detection & Monitoring

Log Indicators:

  • Unusual FreeMarker template executions
  • Suspicious OS command patterns in application logs
  • Multiple failed authentication attempts followed by successful developer login

Network Indicators:

  • Unexpected outbound connections from Crafter CMS server
  • Unusual process spawns from application server

SIEM Query:

source="crafter-logs" AND (freemarker OR "static method" OR "ProcessBuilder" OR "Runtime.exec")

🔗 References

📤 Share & Export