CVE-2018-12895 Path traversal in n/a

High 8.8 Published Updated

Authenticated Authors can delete wp-config.php via path traversal to trigger reinstallation and gain administrative privileges.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-12895?

CVE-2018-12895 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 26 Jun 2018. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

WordPress through 4.9.6 allows Author users to execute arbitrary code by leveraging directory traversal in the wp-admin/post.php thumb parameter, which is passed to the PHP unlink function and can delete the wp-config.php file. This is related to missing filename validation in the wp-includes/post.php wp_delete_attachment function. The attacker must have capabilities for files and posts that are normally available only to the Author, Editor, and Administrator roles. The attack methodology is to delete wp-config.php and then launch a new installation process to increase the attacker's privileges.

Weakness: CWE-22

Which versions are affected by CVE-2018-12895?

It affects 2 products.

Products include Debian Debian Linux, Wordpress Wordpress.

How do I fix CVE-2018-12895?

Apply the vendor's patch.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2018-12895 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-12895 exists.

Public exploit code: 1 Metasploit module and 1 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2018-12895, DSA-4250-1, GHSA-v8xj-g4jr-hwhf, UBUNTU-CVE-2018-12895.

Is CVE-2018-12895 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free