CVE-2021-27917

7.3 HIGH

📋 TL;DR

This stored cross-site scripting (XSS) vulnerability in Mautic allows attackers to inject malicious scripts into contact tracking and page hits reports. When users view these reports, the scripts execute in their browsers, potentially stealing session cookies or performing actions as the user. This affects all Mautic instances running vulnerable versions.

💻 Affected Systems

Products:
  • Mautic
Versions: All versions prior to 3.3.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: This affects the contact tracking and page hits reporting functionality specifically. All Mautic deployments with these features enabled are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, gain full administrative access to the Mautic instance, and potentially pivot to other systems or steal sensitive customer data from the marketing automation platform.

🟠

Likely Case

Attackers inject malicious JavaScript that steals user session cookies when administrators or users view affected reports, leading to account compromise and unauthorized access to the Mautic dashboard.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before execution, preventing any successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The advisory includes technical details about the vulnerability. Stored XSS vulnerabilities are commonly weaponized due to their persistence and impact.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.3.4

Vendor Advisory: https://github.com/mautic/mautic/security/advisories/GHSA-xpc5-rr39-v8v2

Restart Required: No

Instructions:

1. Backup your Mautic instance and database. 2. Update to Mautic version 3.3.4 or later. 3. Clear application caches. 4. Verify the update was successful by checking the version.

🔧 Temporary Workarounds

Disable contact tracking and page hits reports

all

Temporarily disable the vulnerable reporting features until patching is possible.

Implement Content Security Policy (CSP)

all

Add a strict CSP header to prevent execution of injected scripts.

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

🧯 If You Can't Patch

  • Restrict access to Mautic admin interface to trusted IP addresses only
  • Implement web application firewall (WAF) rules to block XSS payloads

🔍 How to Verify

Check if Vulnerable:

Check your Mautic version. If it's below 3.3.4, you are vulnerable.

Check Version:

Check the Mautic admin dashboard or run: php bin/console mautic:version

Verify Fix Applied:

After updating, verify the version is 3.3.4 or higher and test that contact tracking reports properly sanitize input.

📡 Detection & Monitoring

Log Indicators:

  • Unusual JavaScript payloads in contact tracking data
  • Multiple failed login attempts from new locations after viewing reports

Network Indicators:

  • Outbound connections to suspicious domains from Mautic server after report views

SIEM Query:

source="mautic_logs" AND (message="*<script>*" OR message="*javascript:*")

🔗 References

📤 Share & Export