Craft CMS 4.0.0 before 4.18.7 and 5.0.0 before 5.10.14 Arbitrary File Read via Twig create() DOMDocument
Craft CMS 4.0.0 before 4.18.7 and 5.0.0 before 5.10.14 contains an arbitrary file read vulnerability because the Twig create() class blocklist does not cover DOMDocument. Attackers able to set an entry-type title format, including via project-config/apply, can use create('DOMDocument').loadHTMLFile() with textContent to expose local file contents to non-admin users who can view entries.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-109304
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 22:55 UTC · Revision 1
Source evidence
Craft CMS 4.0.0 before 4.18.7 and 5.0.0 before 5.10.14 Arbitrary File Read via Twig create() DOMDocument
core-osv · Original sourcePublished 12 Oct 2026, 16:05 UTC
Craft CMS 4.0.0 before 4.18.7 and 5.0.0 before 5.10.14 contains an arbitrary file read vulnerability because the Twig create() class blocklist does not cover DOMDocument. Attackers able to set an entry-type title format, including via project-config/apply, can use create('DOMDocument').loadHTMLFile() with textContent to expose local file contents to non-admin users who can view entries.
osv:CVE-2026-109304
Complete source record
{
"id": "b793f443a7334196fa5fa6b6fd6781bfc2250a97d72833e9f53fd3b86b627d76",
"url": "https://osv.dev/vulnerability/CVE-2026-109304",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Craft CMS 4.0.0 before 4.18.7 and 5.0.0 before 5.10.14 Arbitrary File Read via Twig create() DOMDocument",
"summary": "Craft CMS 4.0.0 before 4.18.7 and 5.0.0 before 5.10.14 contains an arbitrary file read vulnerability because the Twig create() class blocklist does not cover DOMDocument. Attackers able to set an entry-type title format, including via project-config/apply, can use create('DOMDocument').loadHTMLFile() with textContent to expose local file contents to non-admin users who can view entries.",
"evidence": "osv:CVE-2026-109304",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-109304",
"aliases": [
"CVE-2026-109304",
"GHSA-j5wg-m2pr-35qc"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/craftcms/cms",
"type": "GIT",
"events": [
{
"introduced": "982efcd14d7e93a1a54f0905b61f242de6b53d8a"
},
{
"fixed": "565b88afb88df790c5465bcbb0a0b8aef2903dd2"
},
{
"introduced": "f6a8fb685d44e387435825e3a96809eeda4973a6"
},
{
"fixed": "6804f92fbdd93c3a3fb40f15bcd76a406e97634d"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.18.7"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"introduced": "5.0.0"
},
{
"fixed": "5.10.14"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-109304.json"
}
}
],
"modified": "2026-10-28T02:30:24.126013264Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/109xxx/CVE-2026-109304.json",
"https://github.com/craftcms/cms/security/advisories/GHSA-j5wg-m2pr-35qc",
"https://nvd.nist.gov/vuln/detail/CVE-2026-109304",
"https://www.vulncheck.com/advisories/craft-cms-4.0.0-before-4.18.7-and-5.0.0-before-5.10.14-arbitrary-file-read-via-twig-create-domdocument"
],
"provider_metadata": {
"cwe_ids": [
"CWE-200"
],
"cna_assigner": "VulnCheck",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/109xxx/CVE-2026-109304.json"
}
},
"related_cves": [
{
"value": "CVE-2026-109304",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 490681,
"published_at": "2026-10-12T16:05:00.86+00:00"
}