CVE-2021-27912

7.1 HIGH

📋 TL;DR

This vulnerability allows authenticated Mautic users with asset creation/edit permissions to inject malicious JavaScript into asset titles. When other users view these assets, the JavaScript executes in their browsers, potentially stealing session cookies or performing unauthorized actions. Only authenticated users with specific permissions can exploit this vulnerability.

💻 Affected Systems

Products:
  • Mautic
Versions: All versions before 3.3.4 and 4.0.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with permission to create or edit assets. The vulnerability is present in the default configuration of affected versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An authenticated malicious insider could steal administrator session cookies, gain full administrative access, and compromise the entire Mautic instance and potentially connected systems.

🟠

Likely Case

An authenticated user with asset permissions could perform session hijacking against other users, potentially accessing sensitive marketing data or performing unauthorized actions within their permission scope.

🟢

If Mitigated

With proper access controls and input validation, the impact is limited to authenticated users with asset permissions, reducing the attack surface significantly.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated access with specific permissions. The vulnerability is well-documented in public advisories with technical details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.3.4 or 4.0.0

Vendor Advisory: https://github.com/mautic/mautic/security/advisories/GHSA-rh5w-82wh-jhr8

Restart Required: No

Instructions:

1. Backup your Mautic instance and database. 2. Update Mautic to version 3.3.4 or 4.0.0 using your preferred update method (composer, manual download, or package manager). 3. Clear the cache if necessary. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict Asset Permissions

all

Temporarily restrict asset creation and editing permissions to only trusted administrators until patching can be completed.

Content Security Policy

all

Implement a strict Content Security Policy header to prevent inline JavaScript execution.

Add 'Content-Security-Policy: script-src 'self'' to web server configuration

🧯 If You Can't Patch

  • Review and audit all user accounts with asset permissions, removing unnecessary access
  • Implement web application firewall rules to detect and block XSS payloads in asset titles

🔍 How to Verify

Check if Vulnerable:

Check your Mautic version via the admin dashboard or by examining the composer.json file. If version is below 3.3.4 (for 3.x) or below 4.0.0, you are vulnerable.

Check Version:

php bin/console mautic:version or check composer.json version field

Verify Fix Applied:

After updating, verify the version shows 3.3.4 or higher (for 3.x) or 4.0.0 or higher. Test that inline JavaScript in asset titles is properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual asset creation/modification patterns
  • JavaScript payloads in asset title fields
  • Multiple failed login attempts followed by asset creation

Network Indicators:

  • HTTP requests containing JavaScript in asset title parameters
  • Unusual outbound connections from Mautic server after asset viewing

SIEM Query:

source="mautic_logs" AND (asset_title CONTAINS "<script>" OR asset_title CONTAINS "javascript:")

🔗 References

📤 Share & Export