CVE-2019-8942: WordPress before 4.9.9 and 5.x before 5.0.1 allows remote code execution because an _wp_attached_file Post Meta entry can be changed to an arbitrary string, such as one ending with a .jpg?file.php sub

high Affects WordPress core. Feed 2026.10.29.1, updated 2026-10-28; published ; advisory modified .

WordPress before 4.9.9 and 5.x before 5.0.1 allows remote code execution because an _wp_attached_file Post Meta entry can be changed to an arbitrary string, such as one ending with a .jpg?file.php sub

Package
WordPress core WordPress
Affected versions
<4.9.9 or =5.0
Fixed in
4.9.9
Severity
high  CVSS 8.8
Exploitation
not on CISA KEV · EPSS 83% (99.7th percentile)
Published
2019-02-20
Source
nvd

References

CWE-434
NVD recordWordPress core advisories

Am I affected?

Find out in one command. phpwarden checks your WordPress install against this advisory and 20,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.

# one-time install
pip install phpwarden

# then
phpwarden wordpress /var/www/html

Or keep it checked automatically with the GitHub Action or a nightly cron; see WordPress docs.

Install docs   How findings are ranked

Related advisories