Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-1540: CWE-94 Improper Control of Generation of Code ('Code Injection') in Spam Protect for Contact Form 7

0
High
VulnerabilityCVE-2026-1540cvecve-2026-1540cwe-94
Published: Thu Apr 02 2026 (04/02/2026, 06:00:10 UTC)
Source: CVE Database V5
Product: Spam Protect for Contact Form 7

Description

The Spam Protect for Contact Form 7 WordPress plugin before 1.2.10 allows logging to a PHP file, which could allow an attacker with editor access to achieve Remote Code Execution by using a crafted header

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/02/2026, 14:08:39 UTC

Technical Analysis

CVE-2026-1540 is a vulnerability classified under CWE-94, indicating improper control of code generation, specifically code injection, in the Spam Protect for Contact Form 7 WordPress plugin prior to version 1.2.10. The plugin allows logging data to a PHP file, which can be manipulated by an attacker who has editor-level access to the WordPress site. By crafting a malicious HTTP header, the attacker can inject arbitrary PHP code into the log file. Since the log file is a PHP file, this injected code can be executed by the server, resulting in remote code execution (RCE). This vulnerability requires the attacker to have authenticated editor privileges, which are commonly granted to trusted users who can modify content but are not administrators. The CVSS v3.1 score of 7.2 reflects the high impact on confidentiality, integrity, and availability, with network attack vector, low attack complexity, and no user interaction required. The vulnerability is particularly dangerous because it can lead to full site compromise, data theft, defacement, or pivoting to other internal systems. No public exploits have been reported yet, but the presence of this vulnerability in a widely used WordPress plugin makes it a significant risk. The vulnerability was reserved in January 2026 and published in April 2026, indicating recent discovery and disclosure.

Potential Impact

The impact of CVE-2026-1540 is substantial for organizations running WordPress sites with the vulnerable Spam Protect for Contact Form 7 plugin. Successful exploitation allows an attacker with editor access to execute arbitrary PHP code remotely, potentially leading to full site takeover. This compromises the confidentiality of sensitive data stored or processed by the site, including user information and internal business data. Integrity is affected as attackers can modify website content, inject malicious scripts, or alter logs and configurations. Availability may be disrupted through denial-of-service conditions or by attackers installing backdoors or ransomware. The requirement for editor-level access limits the attack surface but does not eliminate risk, especially in environments with multiple content editors or weak internal access controls. Organizations relying on this plugin for spam protection may face reputational damage, regulatory penalties, and operational disruption if exploited. The absence of known exploits in the wild suggests a window for proactive mitigation before widespread attacks occur.

Mitigation Recommendations

To mitigate CVE-2026-1540, organizations should immediately update the Spam Protect for Contact Form 7 plugin to version 1.2.10 or later, where the vulnerability has been addressed. Until the update is applied, restrict editor-level permissions to only highly trusted users and audit existing editor accounts for suspicious activity. Implement strict input validation and sanitization on all HTTP headers and user inputs where possible. Disable or restrict logging to PHP files if configurable, or change logging to non-executable formats such as plain text or JSON. Employ web application firewalls (WAFs) with rules to detect and block suspicious header manipulations. Regularly monitor logs for unusual entries that could indicate exploitation attempts. Conduct periodic security reviews of WordPress user roles and permissions to minimize privilege escalation risks. Finally, maintain up-to-date backups of the website and database to enable rapid recovery in case of compromise.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
WPScan
Date Reserved
2026-01-28T14:37:11.670Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69ce74d2e6bfc5ba1ddd16cd

Added to database: 4/2/2026, 1:53:22 PM

Last enriched: 4/2/2026, 2:08:39 PM

Last updated: 4/4/2026, 7:02:34 AM

Views: 19

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses