CVE-2024-35191

4.4 MEDIUM

📋 TL;DR

This vulnerability allows authenticated users with form settings access to inject malicious Twig code into form fields like Submission Title or Success Message. The code executes when submissions are created or messages are rendered, potentially leading to server-side template injection. Affects Formie plugin users on Craft CMS with insufficient input validation.

💻 Affected Systems

Products:
  • Formie Craft CMS Plugin
Versions: All versions prior to 2.1.6
Operating Systems: Any OS running Craft CMS
Default Config Vulnerable: ⚠️ Yes
Notes: Requires user with form settings access; affects fields supporting Twig like Submission Title and Success Message.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Authenticated attacker executes arbitrary server-side code, potentially leading to full system compromise, data theft, or complete site takeover.

🟠

Likely Case

Privileged user exploits the vulnerability to execute limited server-side commands, potentially accessing sensitive data or modifying site content.

🟢

If Mitigated

With proper access controls and input validation, impact is limited to authorized users misusing their legitimate permissions.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access to form settings; no public exploit code identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.1.6

Vendor Advisory: https://github.com/verbb/formie/security/advisories/GHSA-v45m-hxqp-fwf5

Restart Required: No

Instructions:

1. Update Formie plugin to version 2.1.6 or later via Craft CMS control panel or Composer. 2. Verify update completes successfully. 3. Test form functionality.

🔧 Temporary Workarounds

Restrict Form Settings Access

all

Limit user permissions to only trusted administrators for form configuration.

Input Validation

all

Implement custom validation to sanitize Twig code in form fields.

🧯 If You Can't Patch

  • Immediately restrict form settings access to minimal trusted users only.
  • Monitor logs for suspicious Twig code execution attempts in form submissions.

🔍 How to Verify

Check if Vulnerable:

Check Formie plugin version in Craft CMS admin panel under Settings → Plugins.

Check Version:

php craft formie/version

Verify Fix Applied:

Confirm Formie version is 2.1.6 or higher in plugin settings.

📡 Detection & Monitoring

Log Indicators:

  • Unusual Twig code execution in form submission logs
  • Multiple failed form submission attempts with code snippets

Network Indicators:

  • Unexpected server responses from form submission endpoints

SIEM Query:

source="craft_logs" AND (message="*Twig*" OR message="*formie*" AND severity="ERROR")

🔗 References

📤 Share & Export