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, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-1452-1, DSA-4250-1
Debian Bugs902876

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
wordpress (PTS)bullseye (security), bullseye5.7.11+dfsg1-0+deb11u1fixed
bookworm, bookworm (security)6.1.6+dfsg1-0+deb12u1fixed
sid, trixie6.6.1+dfsg1-1fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
wordpresssourcejessie4.1+dfsg-1+deb8u18DLA-1452-1
wordpresssourcestretch4.7.5+dfsg-2+deb9u4DSA-4250-1
wordpresssource(unstable)4.9.7+dfsg1-1902876

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