CVE-2018-12895: Path Traversal

Published Jun 26, 2018
·
Updated

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

4 affected componentsFixes available
debian/wordpress
5.0.15+dfsg1-0+deb10u15.0.19+dfsg1-0+deb10u15.7.8+dfsg1-0+deb11u26.1.1+dfsg1-16.3.1+dfsg1-1
WordPress WordPress<4.9.7
Debian Debian Linux=8.0
Debian Debian Linux=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/wordpress to 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

Jun 26, 2018
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
Description
Jul 2, 2018
Data Sourced
05:33 PM
SeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203