{"id":"CVE-2026-28697","state":"PUBLISHED","title":"Craft Affected by Authenticated RCE via \"craft.app.fs.write()\" in Twig Templates","description":"Craft is a content management system (CMS). Prior to 4.17.0-beta.1 and 5.9.0-beta.1, an authenticated administrator can achieve Remote Code Execution (RCE) by injecting a Server-Side Template Injection (SSTI) payload into Twig template fields (e.g., Email Templates). By calling the craft.app.fs.write() method, an attacker can write a malicious PHP script to a web-accessible directory and subsequently access it via the browser to execute arbitrary system commands. This vulnerability is fixed in 4.17.0-beta.1 and 5.9.0-beta.1.","publishedAt":"2026-03-04T16:26:37.476Z","updatedAt":"2026-03-06T05:01:23.152Z","severity":{"score":9.4,"label":"Critical","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["craftcms cms"],"affected":[{"vendor":"craftcms","product":"cms","versions":[{"version":">= 5.0.0-RC1, < 5.9.0-beta.1","status":"affected"},{"version":">= 4.0.0-RC1, < 4.17.0-beta.1","status":"affected"}]}],"references":["https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x","https://github.com/craftcms/cms/pull/18216","https://github.com/craftcms/cms/pull/18219","https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197"],"weaknesses":["CWE-1336"],"ingestedAt":"2026-10-29T20:11:31.369Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/28xxx/CVE-2026-28697.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-28697","state":"PUBLISHED","datePublished":"2026-03-04T16:26:37.476Z","dateUpdated":"2026-03-06T05:01:23.152Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-02T21:43:19.928Z"},"containers":{"cna":{"title":"Craft Affected by Authenticated RCE via \"craft.app.fs.write()\" in Twig Templates","descriptions":[{"lang":"en","value":"Craft is a content management system (CMS). Prior to 4.17.0-beta.1 and 5.9.0-beta.1, an authenticated administrator can achieve Remote Code Execution (RCE) by injecting a Server-Side Template Injection (SSTI) payload into Twig template fields (e.g., Email Templates). By calling the craft.app.fs.write() method, an attacker can write a malicious PHP script to a web-accessible directory and subsequently access it via the browser to execute arbitrary system commands. This vulnerability is fixed in 4.17.0-beta.1 and 5.9.0-beta.1."}],"affected":[{"vendor":"craftcms","product":"cms","versions":[{"version":">= 5.0.0-RC1, < 5.9.0-beta.1","status":"affected"},{"version":">= 4.0.0-RC1, < 4.17.0-beta.1","status":"affected"}]}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x","name":"https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/craftcms/cms/pull/18216","name":"https://github.com/craftcms/cms/pull/18216","tags":["x_refsource_MISC"]},{"url":"https://github.com/craftcms/cms/pull/18219","name":"https://github.com/craftcms/cms/pull/18219","tags":["x_refsource_MISC"]},{"url":"https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197","name":"https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"HIGH","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","subAvailabilityImpact":"HIGH","baseScore":9.4,"baseSeverity":"CRITICAL","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1336","lang":"en","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-03-04T16:26:37.476Z"},"source":{"advisory":"GHSA-v47q-jxvr-p68x","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-05T00:00:00+00:00","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3","id":"CVE-2026-28697"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-06T05:01:23.152Z"}}]}}}