CVE-2024-31210

PHP file upload bypass via Plugin installer

7.7 high EPSS 0.99%

Published 4 Apr 2024 Updated 2 Aug 2024 CNA: GitHub_M

Check your servers for CVE-2024-31210

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-31210 affects wordpress-develop, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

WordPress 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.

Severity (CVSS)

7.7 high CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
high: the attacker needs an administrative account
User interaction
required: a user has to do something, such as open a link or a file
Scope
changed: the damage reaches other components, such as the host of a container or other users
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.99%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 63.6% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Apr 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

  • CWE-434 Unrestricted Upload of File with Dangerous Type

Affected products

As the CNA lists them.

ProductVersions
wordpress-develop
affected >= 6.4.0, < 6.4.3
affected >= 6.3.0, < 6.3.3
affected >= 6.2.0, < 6.2.4
affected >= 6.1.0, < 6.1.5
affected >= 6.0.0, < 6.0.7
affected >= 5.9.0, < 5.9.9
affected >= 5.8.0, < 5.8.9
affected >= 5.7.0, < 5.7.11
affected >= 5.6.0, < 5.6.13
affected >= 5.5.0, < 5.5.14
affected >= 5.4.0, < 5.4.15
affected >= 5.3.0, < 5.3.17
affected >= 5.2.0, < 5.2.20
affected >= 5.1.0, < 5.1.18
affected >= 5.0.0, < 5.0.21
affected >= 4.9.0, < 4.9.25
affected >= 4.8.0, < 4.8.24
affected >= 4.7.0, < 4.7.28
affected >= 4.6.0, < 4.6.28
affected >= 4.5.0, < 4.5.31
affected >= 4.4.0, < 4.4.32
affected >= 4.3.0, < 4.3.33
affected >= 4.2.0, < 4.2.37
affected < 4.1.40

Is my server affected?

Find the installed version of wordpress-develop and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i wordpress-develop
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-31210 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-31210

RHEL, Rocky, Alma, Fedora

rpm -q wordpress-develop
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-31210

Alpine

apk list --installed | grep -i wordpress-develop

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-31210
trivy image --scanners vuln IMAGE | grep CVE-2024-31210

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Source: the record CVE-2024-31210 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.