CVE-2024-31210
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 · uneditedWordPress is an open publishing platform for the Web. It's possible for a file of a type other than a zip file to be submitted as a new plugin by an administrative user on the Plugins -> Add New -> Upload Plugin screen in WordPress. If FTP credentials are requested for installation (in order to move the file into place outside of the `uploads` directory) then the uploaded file remains temporary available in the Media Library despite it not being allowed. If the `DISALLOW_FILE_EDIT` constant is set to `true` on the site _and_ FTP credentials are required when uploading a new theme or plugin, then this technically allows an RCE when the user would otherwise have no means of executing arbitrary PHP code. This issue _only_ affects Administrator level users on single site installations, and Super Admin level users on Multisite installations where it's otherwise expected that the user does not have permission to upload or execute arbitrary PHP code. Lower level users are not affected. Sites where the `DISALLOW_FILE_MODS` constant is set to `true` are not affected. Sites where an administrative user either does not need to enter FTP credentials or they have access to the valid FTP credentials, are not affected. The issue was fixed in WordPress 6.4.3 on January 30, 2024 and backported to versions 6.3.3, 6.2.4, 6.1.5, 6.0.7, 5.9.9, 5.8.9, 5.7.11, 5.6.13, 5.5.14, 5.4.15, 5.3.17, 5.2.20, 5.1.18, 5.0.21, 4.9.25, 2.8.24, 4.7.28, 4.6.28, 4.5.31, 4.4.32, 4.3.33, 4.2.37, and 4.1.40. A workaround is available. If the `DISALLOW_FILE_MODS` constant is defined as `true` then it will not be possible for any user to upload a plugin and therefore this issue will not be exploitable.
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 confidenceWordPress allows non-zip files to be uploaded as plugins via the admin interface. When FTP credentials are required (due to file permission issues preventing direct writes outside the uploads directory), the uploaded file incorrectly persists in the Media Library. Combined with `DISALLOW_FILE_EDIT=true`, this allows an Administrator-level user to achieve remote code execution by uploading a malicious PHP file disguised as a plugin, bypassing restrictions that should prevent arbitrary PHP execution.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 4.1.40>= 4.2, < 4.2.37>= 4.3, < 4.3.33>= 4.4, < 4.4.32>= 4.5, < 4.5.31>= 4.6, < 4.6.28>= 4.7, < 4.7.28>= 4.8, < 4.8.24>= 4.9, < 4.9.25>= 5.0, < 5.0.21>= 5.1, < 5.1.18>= 5.2, < 5.2.20CVSS 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
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/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.
-
Check the installed WordPress versionNavigate to Dashboard > Updates or check the version in the site source, or query the wp_options database table for the 'db_version' or 'version' option valueAffected if The version is less than 4.1.40, or between 4.2.x and 4.2.36, 4.3.x and 4.3.32, 4.4.x and 4.4.31, 4.5.x and 4.5.30, 4.6.x and 4.6.27, 4.7.x and 4.7.27, 4.8.x and 4.8.23, 4.9.x and 4.9.24, 5.0.x and 5.0.20, 5.1.x and 5.1.17, or 5.2.x and 5.2.19
-
Verify if FTP credentials are required for plugin uploadsAttempt to upload a plugin via Dashboard > Plugins > Add New. If WordPress prompts for FTP credentials or fails with permission errors, FTP mode is requiredAffected if FTP credentials are required or the upload fails due to file permission issues preventing direct writes outside the uploads directory
-
Confirm DISALLOW_FILE_EDIT is enabledCheck the wp-config.php file for the line define( 'DISALLOW_FILE_EDIT', true );Affected if DISALLOW_FILE_EDIT is set to true, which normally blocks plugin/theme file editing but is bypassed by this vulnerability
-
Test if non-zip files can be uploaded as pluginsUsing an Administrator account, attempt to upload a non-zip file (such as a .php file) as a plugin via the plugin upload interfaceAffected if The upload succeeds and the file appears in the Media Library instead of being rejected as an invalid plugin archive
You are affected if your WordPress version is within the vulnerable ranges AND FTP credentials are required AND you have DISALLOW_FILE_EDIT enabled, allowing non-zip PHP files to be uploaded and executed.
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 · scoped4.1.404.2.374.3.33
Set `DISALLOW_FILE_MODS` to true in wp-config.php to block all plugin/theme uploads, or ensure proper file permissions so FTP credentials are not required, or upgrade to WordPress 6.4.3+ (or any patched version).
WordPress 4.1.40 (minimum for 4.1.x), 4.2.37 (minimum for 4.2.x), 4.3.33 (minimum for 4.3.x), 4.4.32 (minimum for 4.4.x), or latest stable 6.4.3+
- Upgrade to WordPress 4.1.40 or higher (for the 4.1.x branch), WordPress 4.2.37 or higher (for the 4.2.x branch), WordPress 4.3.33 or higher (for the 4.3.x branch), or WordPress 4.4.32 or higher (for the 4.4.x branch)
- Alternatively, upgrade to the latest stable WordPress release (6.4.3 or later) to receive all security fixes
- After upgrading, verify the Plugins -> Add New -> Upload Plugin screen now properly validates and rejects non-zip files
- As an additional hardening measure, ensure DISALLOW_FILE_MODS is set to true in wp-config.php if the site does not require plugin/theme installations
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation1.0 h
- Testing3.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,936.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-31210 — 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-2024-31210 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