CVE-2016-5839

WordPress Core < 4.5.3 - Bypass sanitize_file_name Protection

2016-06-18 00:00
Peter Westwood

Strategic Overview

Status
Patched in 3.7.15
Affected Core
WordPress 4.5
Affected Version
3.7 – 4.5.2 · 10 branches
CVSS
7.3High
Weakness type
CWE-434 · Unrestricted Upload of File with Dangerous Type
CVE
CVE-2016-5839
View all WordPress 4.5 vulnerabilities

At a glance

CVE-2016-5839 is a high-severity Unrestricted Upload of File with Dangerous Type vulnerability in the WordPress 4.5 WordPress release line, affecting 3.7 – 4.5.2 · 10 branches. It carries a CVSS score of 7.3 (reachable over the network; low attack complexity). Exploitation requires no authentication. The issue is fixed in version 3.7.15; sites on affected versions should update now. Disclosed June 2016, reported by Peter Westwood.

Vulnerability Overview

WordPress before 4.5.3 allows remote attackers to bypass the sanitize_file_name protection mechanism via unspecified vectors.

Technical Analysis

The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no privileges on the target site, and no interaction from a victim user.

CWE-434: Unrestricted Upload of File with Dangerous Type

Reaching this weakness in WordPress 4.5 3.7 – 4.5.2 · 10 branches takes a caller who can reach the endpoint. An unrestricted file upload lets a caller store a file whose type or destination the application does not properly constrain.

If an uploaded file lands anywhere the server will execute, the flaw becomes remote code execution and the site should be treated as fully compromised. For WordPress 4.5 the fix is 3.7.15: builds 3.7 – 4.5.2 · 10 branches are affected, anything from 3.7.15 onward is not.

Remediation

Update to one of the following versions, or a newer patched version: 3.7.15, 3.8.15, 3.9.13, 4.0.12, 4.1.12, 4.2.9, 4.3.5, 4.4.4, 4.5.3

How does WordSec protect against this?

The attempt arrives as an ordinary request to WordPress 4.5: WordSec's web application firewall inspects request payloads before WordPress loads them. Classes like this one can leave something behind, so the staged malware scanner is the second half: it looks for dropped files and modified code rather than for the request that created them. None of that substitutes for the fix: updating to 3.7.15 is the step that ends it.

  • Firewall
  • Scanner
  • Alerts

External References

Related records

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C