CVE-2024-13294
📋 TL;DR
This vulnerability allows attackers to inject malicious scripts into web pages generated by the Drupal POST File module, which could execute in users' browsers. It affects Drupal sites using the POST File module version 0.0.0 through 1.0.1. Users who visit pages with the vulnerable module are at risk of cross-site scripting attacks.
💻 Affected Systems
- Drupal POST File module
📦 What is this software?
Post File by Post File Project
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal session cookies, redirect users to malicious sites, or perform actions on behalf of authenticated users, potentially leading to account compromise or data theft.
Likely Case
Attackers inject malicious scripts that steal session cookies or redirect users to phishing pages, compromising individual user accounts.
If Mitigated
With proper input validation and output encoding, the impact is limited to potential script execution in isolated contexts with minimal damage.
🎯 Exploit Status
XSS vulnerabilities typically have low exploitation complexity. The advisory suggests the vulnerability can be exploited without authentication.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.0.2
Vendor Advisory: https://www.drupal.org/sa-contrib-2024-060
Restart Required: No
Instructions:
1. Update the POST File module to version 1.0.2 via Drupal's update manager or Composer. 2. Clear Drupal caches. 3. Verify the update was successful.
🔧 Temporary Workarounds
Disable POST File module
linuxTemporarily disable the vulnerable module until patching is possible
drush pm-disable post_file
Implement Content Security Policy
allAdd CSP headers to mitigate XSS impact by restricting script execution
🧯 If You Can't Patch
- Implement web application firewall rules to block XSS payloads
- Monitor for suspicious POST requests to file upload endpoints
🔍 How to Verify
Check if Vulnerable:
Check the POST File module version in Drupal's Extend page or via 'drush pm-list | grep post_file'
Check Version:
drush pm-list --fields=name,version --filter="name=post_file"
Verify Fix Applied:
Confirm module version is 1.0.2 or higher and test file upload functionality
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests with script tags or JavaScript in file upload parameters
- Multiple failed file upload attempts with suspicious payloads
Network Indicators:
- HTTP requests containing <script> tags or JavaScript in POST parameters to file upload endpoints
SIEM Query:
source="web_logs" AND (method="POST" AND uri="*file*" AND (body="*<script>*" OR body="*javascript:*"))