CVE-2026-1540
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 · uneditedThe 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 confidenceThe 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.
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 checksWork through these to decide whether this CVE applies to you.
-
Identify if Spam Protect for Contact Form 7 plugin is installedCheck 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=csvAffected if The plugin folder exists in the plugins directory and is active
-
Determine the installed plugin versionCheck 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=versionAffected if The version is lower than 1.2.10 or the version header cannot be found
-
Locate plugin-created PHP log filesSearch 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)
-
Inspect HTTP access logs for header injection attemptsReview 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.logAffected if Logs show requests with PHP code injected into User-Agent or other HTTP headers, especially from editor-level accounts
-
Check for unauthorized editor-level user accountsIn 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.
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 · scopedUpdate 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.
Spam Protect for Contact Form 7 version 1.2.10
- Update the Spam Protect for Contact Form 7 WordPress plugin to version 1.2.10 or later
- 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.
- Consultation2.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-1540 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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