CVE-2018-12895

NameCVE-2018-12895
DescriptionWordPress 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDLA-1452-1, DSA-4250-1
NVD severitymedium (attack range: remote)
Debian Bugs902876

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
wordpress (PTS)jessie4.1+dfsg-1+deb8u17vulnerable
jessie (security)4.1+dfsg-1+deb8u18fixed
stretch4.7.5+dfsg-2+deb9u3vulnerable
stretch (security)4.7.5+dfsg-2+deb9u4fixed
buster, sid4.9.8+dfsg1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
wordpresssource(unstable)4.9.7+dfsg1-1medium902876
wordpresssourcejessie4.1+dfsg-1+deb8u18mediumDLA-1452-1
wordpresssourcestretch4.7.5+dfsg-2+deb9u4mediumDSA-4250-1

Notes

https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/
https://github.com/WordPress/WordPress/commit/c9dce0606b0d7e6f494d4abe7b193ac046a322cd

Search for package or bug name: Reporting problems