WordPress Core < 5.0.1 - Remote Code Execution

Improper Control of Generation of Code ('Code Injection')
CVE CVE-2019-8942
CVSS High (8.8)
Publicly Published February 19, 2019
Last Updated January 22, 2024
Researcher Simon Scannell
Description

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 substring. An attacker with author privileges can execute arbitrary code by uploading a crafted image containing PHP code in the Exif metadata. Exploitation can leverage CVE-2019-8943.

References

1 affected software package

Software Type Core
Software Slug wordpress (view on wordpress.org)
Patched? Yes
Affected Version
  • <= 3.7
  • 3.7 - 3.7.27
  • 3.8 - 3.8.27
  • 3.9 - 3.9.25
  • 4.0 - 4.0.24
  • 4.1 - 4.1.24
  • 4.2 - 4.2.21
  • 4.3 - 4.3.17
  • 4.4 - 4.4.16
  • 4.5 - 4.5.15
  • 4.6 - 4.6.12
  • 4.7 - 4.7.11
  • 4.8 - 4.8.7
  • 4.9 - 4.9.8
  • 5.0 - 5.0
Patched Version
  • 3.7.28
  • 3.8.28
  • 3.9.26
  • 4.0.25
  • 4.1.25
  • 4.2.22
  • 4.3.18
  • 4.4.17
  • 4.5.16
  • 4.6.13
  • 4.7.12
  • 4.8.8
  • 4.9.9
  • 5.0.1
This record contains material that is subject to copyright

Copyright 2012-2026 Defiant Inc.
License: Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy. License Detail.