{"id":"CVE-2026-28697","published":"2026-03-04T16:26:37Z","modified":"2026-03-06T05:01:23Z","title":"Craft Affected by Authenticated RCE via \"craft.app.fs.write()\" in Twig Templates","vendor":"Craft CMS","product":"cms","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01188,"percentile":0.68655,"provenance":"source"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/craftcms/cms/pull/18216","tags":["x_refsource_MISC"]},{"url":"https://github.com/craftcms/cms/pull/18219","tags":["x_refsource_MISC"]},{"url":"https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197","tags":["x_refsource_MISC"]}],"priority":{"score":20.3,"factors":[{"name":"EPSS percentile","points":13.73},{"name":"CVSS severity","points":6.58}]},"vendorSlug":"craft-cms","affectedVersions":[{"vendor":"craftcms","product":"cms","versions":[">= 5.0.0-RC1, < 5.9.0-beta.1",">= 4.0.0-RC1, < 4.17.0-beta.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-03-05T00:00:00+00:00","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"craftcms/cms","vulnerableRanges":[">=5.0.0-RC1, <5.9.0-beta.1",">=4.0.0-RC1, <4.17.0-beta.1"],"patched":["5.9.0-beta.1","4.17.0-beta.1"],"from":["GHSA-v47q-jxvr-p68x"],"provenance":"source"}],"summary":{"text":"Craft CMS (product \"cms\") contains a server-side template injection flaw in Twig template fields, such as Email Templates, that allows Twig payloads to be processed unsafely. An attacker who already holds administrator credentials on the Craft CMS instance and network access to it can inject a payload that calls craft.app.fs.write() to write a PHP script into a web-accessible directory, then request that file in a browser to run arbitrary system commands; no user interaction is needed, and the flaw affects versions before 4.17.0-beta.1 and 5.9.0-beta.1.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:41Z"},"euvd":{"id":"EUVD-2026-9447","exploited":false,"provenance":"source"}}