Code InjectionWeakness · CWE-94

CVE-2026-1540

HIGH · 7.2 CVSS v3.1 Published 2026-04-02
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
78/100
Remediation priority · High
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The Spam Protect for Contact Form 7 plugin before version 1.2.10 contains a logging feature that writes to a PHP file. An attacker with editor-level WordPress access can inject malicious PHP code via crafted HTTP headers (such as User-Agent or other headers). This code gets written to the log file and can be executed by requesting the PHP log file directly, achieving Remote Code Execution.

MitigationUpdate the plugin to version 1.2.10 or later immediately. If compromise is suspected, review and sanitize any PHP log files created by the plugin, and audit user accounts for unauthorized changes.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify if Spam Protect for Contact Form 7 plugin is installed
    Check your WordPress wp-content/plugins directory for a folder named 'spam-protect-for-contact-form-7' or similar variant. You can list installed plugins via WP CLI: wp plugin list --status=active --format=csv
    Affected if The plugin folder exists in the plugins directory and is active
  2. Determine the installed plugin version
    Check the main plugin PHP file (usually spam-protect-for-contact-form-7.php) for the 'Version' header in the plugin comment block, or query via WP CLI: wp plugin get spam-protect-for-contact-form-7 --field=version
    Affected if The version is lower than 1.2.10 or the version header cannot be found
  3. Locate plugin-created PHP log files
    Search the wp-content/uploads directory and the plugin directory for .php files with names suggesting logging (such as log.php, debug.php, or similar). Use: find /path/to/wp-content -name '*.php' -mtime -30 to find recently modified PHP files, then inspect their contents for suspicious PHP code or header data.
    Affected if A PHP log file exists that contains injected PHP code (look for base64_decode, eval, shell_exec, or raw PHP opening tags with unfamiliar code)
  4. Inspect HTTP access logs for header injection attempts
    Review your web server access logs (apache2/access.log, nginx/access.log) for requests with suspicious User-Agent strings or unusual headers containing PHP code patterns. Search for: grep -E 'eval|base64|shell_exec|<?php' /var/log/apache2/access.log
    Affected if Logs show requests with PHP code injected into User-Agent or other HTTP headers, especially from editor-level accounts
  5. Check for unauthorized editor-level user accounts
    In WordPress admin, go to Users > All Users and review accounts with Editor role. Query database directly: SELECT user_login, user_email FROM wp_users WHERE ID IN (SELECT user_id FROM wp_usermeta WHERE meta_key = 'wp_capabilities' AND meta_value LIKE '%editor%');
    Affected if Unexpected or unauthorized accounts exist with editor privileges, or editor accounts were created without your knowledge

You are affected if Spam Protect for Contact Form 7 plugin version is below 1.2.10 AND the logging feature is active, or if you find PHP log files containing injected code.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update the plugin to version 1.2.10 or later immediately. If compromise is suspected, review and sanitize any PHP log files created by the plugin, and audit user accounts for unauthorized changes.

Recommended fix Moderate confidence

Spam Protect for Contact Form 7 version 1.2.10

  1. Update the Spam Protect for Contact Form 7 WordPress plugin to version 1.2.10 or later
  2. Verify the update was applied successfully by checking the plugin version in WordPress admin

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing2.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,060
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,696.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-1540 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-1540 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data