Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2019-8942
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 07:25 UTC · Revision 1
Source evidence
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.
osv:CVE-2019-8942
Complete source record
{
"id": "bf7e55d365bf74f81c1f49c6dc12c8d99676a768239c8414c5875eda11599c49",
"url": "https://osv.dev/vulnerability/CVE-2019-8942",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2019-8942",
"summary": "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.",
"evidence": "osv:CVE-2019-8942",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2019-8942",
"aliases": [
"CVE-2019-8942"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/wordpress/wordpress",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "8d87e4a8b8aa7d66a4f5dd3795b5450fa0b76af0"
},
{
"introduced": "491c67be12ca8a9fe37ae38307ba7e298c976ec3"
},
{
"last_affected": "491c67be12ca8a9fe37ae38307ba7e298c976ec3"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.9.9"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:wordpress:wordpress:5.0:-:*:*:*:*:*:*",
"range": [
{
"introduced": "5.0-NA"
},
{
"last_affected": "5.0-NA"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"5.0-NA",
"5.0.0",
"5.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-8942.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/wordpress/wordpress-develop",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "a9ad836e97a736741122210792c64a6b2ed053ba"
},
{
"introduced": "b3bf6266acd61682bc654845f621b4426645e324"
},
{
"last_affected": "b3bf6266acd61682bc654845f621b4426645e324"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.9.9"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:wordpress:wordpress:5.0:-:*:*:*:*:*:*",
"range": [
{
"introduced": "5.0-NA"
},
{
"last_affected": "5.0-NA"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"5.0-NA",
"5.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-8942.json"
}
}
],
"modified": "2026-10-24T10:30:53.201608250Z",
"provider": "osv",
"references": [
"https://wpvulndb.com/vulnerabilities/9222",
"https://www.debian.org/security/2019/dsa-4401",
"https://blog.ripstech.com/2019/wordpress-image-remote-code-execution/",
"https://lists.debian.org/debian-lts-announce/2019/03/msg00044.html",
"https://www.exploit-db.com/exploits/46511/",
"https://www.exploit-db.com/exploits/46662/"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "9.0"
},
{
"last_affected": "9.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:wordpress:wordpress:5.0:beta1:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:beta2:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:beta3:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:beta4:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:beta5:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:rc1:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:rc2:*:*:*:*:*:*",
"cpe:2.3:a:wordpress:wordpress:5.0:rc3:*:*:*:*:*:*"
],
"vendor_product": "wordpress:wordpress",
"extracted_events": [
{
"range": [
{
"introduced": "5.0-beta1"
},
{
"last_affected": "5.0-beta1"
},
{
"introduced": "5.0-beta1"
},
{
"last_affected": "5.0-beta1"
},
{
"introduced": "5.0-beta2"
},
{
"last_affected": "5.0-beta2"
},
{
"introduced": "5.0-beta2"
},
{
"last_affected": "5.0-beta2"
},
{
"introduced": "5.0-beta3"
},
{
"last_affected": "5.0-beta3"
},
{
"introduced": "5.0-beta3"
},
{
"last_affected": "5.0-beta3"
},
{
"introduced": "5.0-beta4"
},
{
"last_affected": "5.0-beta4"
},
{
"introduced": "5.0-beta4"
},
{
"last_affected": "5.0-beta4"
},
{
"introduced": "5.0-beta5"
},
{
"last_affected": "5.0-beta5"
},
{
"introduced": "5.0-beta5"
},
{
"last_affected": "5.0-beta5"
},
{
"introduced": "5.0-rc1"
},
{
"last_affected": "5.0-rc1"
},
{
"introduced": "5.0-rc1"
},
{
"last_affected": "5.0-rc1"
},
{
"introduced": "5.0-rc2"
},
{
"last_affected": "5.0-rc2"
},
{
"introduced": "5.0-rc2"
},
{
"last_affected": "5.0-rc2"
},
{
"introduced": "5.0-rc3"
},
{
"last_affected": "5.0-rc3"
},
{
"introduced": "5.0-rc3"
},
{
"last_affected": "5.0-rc3"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2019-8942",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 437863,
"published_at": "2019-02-20T03:29:00.25+00:00"
}