CVE-2024-32034

6.8 MEDIUM

📋 TL;DR

This vulnerability allows cross-site scripting (XSS) attacks in Decidim's admin panel when administrators perform actions that generate activity logs containing malicious content. Attackers could execute arbitrary JavaScript in the context of admin sessions, potentially compromising administrative accounts. Only Decidim instances with admin panel access are affected.

💻 Affected Systems

Products:
  • Decidim
Versions: Versions before 0.27.7 and 0.28.2
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects instances with admin panel enabled and accessible. The vulnerability requires admin actions that generate activity logs.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Administrative account takeover leading to complete system compromise, data theft, or unauthorized administrative actions across the entire Decidim platform.

🟠

Likely Case

Session hijacking of admin accounts, allowing attackers to perform unauthorized administrative actions or steal sensitive data accessible to administrators.

🟢

If Mitigated

Limited impact with proper input validation and output encoding, potentially only affecting specific admin panel functionality.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires an attacker to craft XSS payloads that get logged in admin activity logs, then wait for an admin to view those logs. Requires some social engineering or persistence.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.27.7, 0.28.2, and newer

Vendor Advisory: https://github.com/decidim/decidim/security/advisories/GHSA-rx9f-5ggv-5rh6

Restart Required: Yes

Instructions:

1. Backup your Decidim instance and database. 2. Update Decidim to version 0.27.7 or 0.28.2 or newer using your package manager or deployment method. 3. Restart the application server. 4. Verify the update was successful.

🔧 Temporary Workarounds

Admin Panel URL Redirection

all

Redirect vulnerable admin pages to other admin pages to prevent access to the XSS-vulnerable activity logs

Configure web server (nginx/apache) to redirect /admin and /admin/logs to /admin/organization/edit

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to mitigate XSS impact
  • Restrict admin panel access to specific IP addresses or VPN-only access

🔍 How to Verify

Check if Vulnerable:

Check your Decidim version. If it's below 0.27.7 or between 0.28.0 and 0.28.1, you are vulnerable.

Check Version:

bundle exec rails runner 'puts Decidim.version'

Verify Fix Applied:

After updating, verify the version is 0.27.7 or higher, or 0.28.2 or higher. Test admin activity log functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual admin activity log entries containing script tags or JavaScript code
  • Multiple failed admin login attempts followed by successful login

Network Indicators:

  • Unexpected JavaScript execution in admin panel responses
  • Suspicious requests to admin endpoints with encoded payloads

SIEM Query:

source="decidim_logs" AND (message="admin" OR message="activity") AND (message CONTAINS "<script>" OR message CONTAINS "javascript:")

🔗 References

📤 Share & Export