Skip to content

CVE-2026-5364: Arbitrary File Upload in Drag and Drop File Upload for Contact Form 7

The vulnerability exists due to a logical error in how the plugin processes file uploads. During the initial stages of the upload process, the plugin extracts file extensions before performing necessary security sanitization. Furthermore, the plugin accepts a user-controlled parameter specifying the file type, rather than strictly adhering to administrator-configured values.

Security validation routines perform checks against the unsanitized file extension. However, the saving mechanism subsequently applies sanitization, effectively stripping characters such as the dollar sign ($) from the filename. This discrepancy between validation and storage allows for the bypass of security filters.

Unauthenticated attackers can craft malicious requests to upload arbitrary files, including PHP scripts, to the web server. While the plugin employs name randomization and .htaccess configuration files in an attempt to restrict direct access to uploaded files, these mechanisms may be circumvented. Consequently, the potential for achieving Remote Code Execution (RCE) exists, particularly in misconfigured server environments where .htaccess files are ignored or improperly parsed.

Technical monitoring should prioritize the following artifacts:

  • Identification of unauthorized or unusual files within the designated plugin upload directories.
  • Presence of files featuring unconventional naming conventions or hidden characters within the file path.
  • Unauthorized modifications to .htaccess files located within or adjacent to the plugin’s upload directory.

The following strategies are recommended to identify and block potential exploitation attempts.

title: Potential Exploitation of CVE-2026-5364
status: experimental
description: Detects suspicious HTTP requests to backend file handlers of the affected plugin.
logsource:
category: web_server
detection:
selection:
c-uri-stem|contains: '/backend/index.php'
c-query-string|contains: 'file type'
condition: selection