CVE-2025-31674
📋 TL;DR
This CVE describes an object injection vulnerability in Drupal core that allows attackers to modify dynamically-determined object attributes improperly. Attackers could potentially execute arbitrary code or manipulate application behavior. All Drupal sites running affected versions are vulnerable.
💻 Affected Systems
- Drupal core
📦 What is this software?
Drupal by Drupal
Drupal by Drupal
Drupal by Drupal
Drupal by Drupal
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or site takeover
Likely Case
Privilege escalation, data manipulation, or denial of service
If Mitigated
Limited impact with proper input validation and security controls in place
🎯 Exploit Status
Exploitation requires understanding of Drupal's object handling and likely requires some level of access
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 10.3.13, 10.4.3, 11.0.12, or 11.1.3
Vendor Advisory: https://www.drupal.org/sa-core-2025-003
Restart Required: No
Instructions:
1. Backup your Drupal site and database. 2. Update Drupal core to the patched version using Composer: 'composer update drupal/core-recommended --with-dependencies'. 3. Run database updates: 'drush updatedb' or via admin interface. 4. Clear all caches: 'drush cr' or via admin interface.
🔧 Temporary Workarounds
Input validation hardening
allImplement additional input validation for user-controlled object attributes
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all user-controlled data
- Restrict access to vulnerable Drupal instances using network segmentation or WAF rules
🔍 How to Verify
Check if Vulnerable:
Check Drupal version via admin interface at /admin/reports/status or run 'drush status'
Check Version:
drush status | grep 'Drupal version' or check /admin/reports/status
Verify Fix Applied:
Confirm version is 10.3.13+, 10.4.3+, 11.0.12+, or 11.1.3+ and test object attribute modification functionality
📡 Detection & Monitoring
Log Indicators:
- Unusual object serialization/deserialization patterns
- Unexpected PHP object creation in logs
- Errors related to unserialize() or object manipulation
Network Indicators:
- Unusual POST requests containing serialized objects
- Requests to Drupal endpoints with unexpected object parameters
SIEM Query:
source="drupal.log" AND ("unserialize" OR "__wakeup" OR "__destruct") AND NOT status=200