CVE-2026-121978 in Ultra Addons for Contact Form 7 Plugin
Summary
by MITRE • 11/26/2026
The Ultra Addons for Contact Form 7 plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'dfile (any CF7 file field)' parameter in all versions up to, and including, 3.5.58 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Successful script execution additionally requires a web server that returns no explicit Content-Type header for the targeted audio/video extension, causing the browser to sniff and render the uploaded file as text/html; default Apache configurations without mod_headers or without honoring .htaccess satisfy this condition. Successful exploitation additionally requires an action by an administrator — the attacker cannot trigger the vulnerability on their own.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/26/2026
The Ultra Addons for Contact Form 7 plugin, a widely used extension for WordPress that enhances standard contact form capabilities with additional field types and styling options, contains a critical security flaw in versions up to and including 3.5.58. This vulnerability manifests as a Stored Cross-Site Scripting issue within the dfile parameter, which handles file uploads such as audio or video attachments submitted through forms generated by Contact Form 7. The root cause lies in insufficient input sanitization and output escaping mechanisms during the processing of these uploaded files. When an attacker submits a malicious payload disguised as a legitimate media file, the plugin fails to adequately validate or encode the content before storing it within the WordPress database or filesystem. This lack of rigorous validation allows arbitrary web scripts to be embedded directly into the site's data store rather than being treated strictly as binary media assets.
The operational impact of this vulnerability is significant because it enables unauthenticated attackers to inject persistent malicious code that executes in the context of any user who views a page containing the compromised file. Unlike reflected XSS, where the payload must be delivered via a link, stored XSS persists on the server side, meaning every visitor or administrator accessing the affected content will trigger the script execution automatically. This persistence transforms a single injection point into a widespread attack vector that can compromise session cookies, hijack administrative sessions, deface websites, or redirect users to phishing sites. The severity is further amplified by the fact that no prior authentication is required for an attacker to upload the malicious file; any visitor with access to the public-facing contact form can exploit this flaw without needing valid credentials.
Successful exploitation of this vulnerability relies on specific environmental conditions related to how web servers handle content type detection. Specifically, the attack requires a web server configuration where the targeted audio or video extension does not have an explicit Content-Type header returned by the server. In such scenarios, modern browsers employ MIME sniffing heuristics to determine how to render the file. If these heuristics identify the uploaded payload as text/html rather than its intended media type, the browser will execute any embedded JavaScript code instead of playing it as audio or video content. This condition is commonly met in default Apache configurations that lack mod_headers directives or fail to honor .htaccess rules for setting correct MIME types for specific file extensions. Consequently, administrators running standard LAMP stacks without explicit security hardening are particularly susceptible to this exploitation chain.
It is important to note a critical constraint regarding the attack surface: while initial upload can be performed by unauthenticated users, successful script execution often requires an action by an administrator or another privileged user who views the uploaded content in a context where the browser performs MIME sniffing and executes the payload. This means that while the vulnerability allows for persistent storage of malicious code, its full impact is realized when high-privilege accounts interact with the compromised data. To mitigate this risk, site administrators should immediately update the Ultra Addons plugin to version 3.5.59 or later, where input sanitization and output escaping have been strengthened. Additionally, web server configurations should be audited to ensure that explicit Content-Type headers are set for all uploaded media files using tools like mod_headers in Apache or equivalent directives in Nginx. This prevents browsers from relying on potentially exploitable MIME sniffing behaviors. Implementing a Web Application Firewall with rules targeting XSS patterns and enforcing strict file type validation at the application level can also provide an additional layer of defense against similar injection attacks aligned with CWE-79 standards for cross-site scripting mitigation.