CVE-2018-12895: Path Traversal
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 wpdeleteattachment 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/wordpressto a version that resolves this vulnerability.Fixed in 5.0.15+dfsg1-0+deb10u1Fixed in 5.0.19+dfsg1-0+deb10u1Fixed in 5.7.8+dfsg1-0+deb11u2Fixed in 6.1.1+dfsg1-1Fixed in 6.3.1+dfsg1-1
Event History
Frequently Asked Questions
What is the severity of CVE-2018-12895?
CVE-2018-12895 is rated as a critical vulnerability due to its ability to allow arbitrary code execution and potential loss of sensitive files.
Who is affected by CVE-2018-12895?
CVE-2018-12895 affects WordPress versions up to and including 4.9.6, as well as specific Debian packages of WordPress.
How do I fix CVE-2018-12895?
To fix CVE-2018-12895, upgrade to WordPress version 4.9.7 or higher or apply the relevant security patches provided for affected Debian versions.
What type of attacks can exploit CVE-2018-12895?
CVE-2018-12895 can be exploited through directory traversal attacks that allow unauthorized users to execute arbitrary PHP code.
What files can be affected by CVE-2018-12895?
CVE-2018-12895 can potentially lead to the deletion of critical files such as wp-config.php, impacting the security and functionality of the WordPress installation.