CVE-2024-13285

9.8 CRITICAL

📋 TL;DR

This vulnerability in Drupal's wkhtmltopdf module allows remote code execution through improper input validation. It affects Drupal sites using the wkhtmltopdf module to generate PDFs. Attackers can exploit this without authentication to execute arbitrary commands on the server.

💻 Affected Systems

Products:
  • Drupal wkhtmltopdf module
Versions: All versions prior to patched release
Operating Systems: All operating systems running Drupal with wkhtmltopdf module
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Drupal installations with the wkhtmltopdf module enabled and configured for PDF generation.

📦 What is this software?

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing attackers to execute arbitrary commands, access sensitive data, install malware, or pivot to other systems.

🟠

Likely Case

Remote code execution leading to data theft, website defacement, or installation of backdoors for persistent access.

🟢

If Mitigated

Limited impact if proper input validation and output encoding are implemented, though risk remains elevated due to the nature of the vulnerability.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The vulnerability appears to be in command injection through wkhtmltopdf parameters, making exploitation relatively straightforward for attackers familiar with the module.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check Drupal security advisory for specific version

Vendor Advisory: https://www.drupal.org/sa-contrib-2024-049

Restart Required: No

Instructions:

1. Visit the Drupal security advisory page. 2. Download and install the patched version of the wkhtmltopdf module. 3. Clear Drupal caches. 4. Verify the module is updated in Drupal's module administration page.

🔧 Temporary Workarounds

Disable wkhtmltopdf module

all

Temporarily disable the vulnerable module until patching is possible

drush pm-disable wkhtmltopdf

Restrict PDF generation access

all

Limit access to PDF generation functionality to authenticated users only

🧯 If You Can't Patch

  • Implement strict input validation for all wkhtmltopdf parameters
  • Deploy web application firewall rules to block suspicious PDF generation requests

🔍 How to Verify

Check if Vulnerable:

Check Drupal's module administration page for wkhtmltopdf module version and compare with patched version in security advisory

Check Version:

drush pm-list --fields=name,version | grep wkhtmltopdf

Verify Fix Applied:

Verify the module version matches or exceeds the patched version listed in the security advisory

📡 Detection & Monitoring

Log Indicators:

  • Unusual PDF generation requests with suspicious parameters
  • Multiple failed PDF generation attempts
  • Commands executed via wkhtmltopdf with unusual arguments

Network Indicators:

  • Spike in requests to PDF generation endpoints
  • Unusual outbound connections from web server following PDF requests

SIEM Query:

source="drupal_access_log" AND (uri="*/pdf*" OR uri="*/wkhtmltopdf*") AND (status=500 OR parameters CONTAINS suspicious_patterns)

🔗 References

📤 Share & Export