CVE-2024-6316: Generate PDF using Contact Form 7 <= 4.1.2 - Cross-Site Request Forgery to Arbitrary File Upload
The Generate PDF using Contact Form 7 plugin for WordPress is vulnerable to Cross-Site Request Forgery to Arbitrary File Upload in versions up to, and including, 4.1.2. This is due to missing nonce validation and missing file type validation in the 'wpcf7pdfdashboardhtmlpage' function. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible via a forged request granted they can trick a site administrator into performing an action such as clicking on a link. CVE-2024-37555 is a duplicate of this issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
wordpress/plugins/"Generate PDF using Contact Form 7"to a version that resolves this vulnerability.Fixed in 4.1.2 - Compensating control
Ensure only trusted, intended users can access the WordPress action that triggers the forged request (mitigate CSRF by preventing unauthenticated attackers from successfully tricking an administrator into performing the affected action).
- Operational
After applying the fix, check the WordPress site for any files uploaded as a result of the CSRF/upload weakness and remove any unexpected files.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-6316?
CVE-2024-6316 is classified as a critical vulnerability due to potential unauthorized file uploads.
How do I fix CVE-2024-6316?
To fix CVE-2024-6316, update the Generate PDF using Contact Form 7 plugin to version 4.0.7 or later.
What types of attacks can CVE-2024-6316 enable?
CVE-2024-6316 can enable Cross-Site Request Forgery attacks leading to arbitrary file uploads.
Which WordPress versions are affected by CVE-2024-6316?
CVE-2024-6316 affects all versions of the Generate PDF using Contact Form 7 plugin up to and including 4.0.6.
Is nonce validation required to mitigate CVE-2024-6316?
Yes, nonce validation is essential to mitigate the risks associated with CVE-2024-6316.