{"id":"CVE-2026-28697","summary":"Craft Affected by Authenticated RCE via \"craft.app.fs.write()\" in Twig Templates","details":"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.","aliases":["GHSA-v47q-jxvr-p68x"],"modified":"2026-08-12T03:51:35.792289159Z","published":"2026-03-04T16:26:37.476Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-1336"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28697.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28697.json"},{"type":"ADVISORY","url":"https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28697"},{"type":"FIX","url":"https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197"},{"type":"FIX","url":"https://github.com/craftcms/cms/pull/18216"},{"type":"FIX","url":"https://github.com/craftcms/cms/pull/18219"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/craftcms/cms","events":[{"introduced":"04755d93f86d07cc183db47db8a0eee106892e30"},{"fixed":"0ad14c3c7e590461b52aeb44859659e2e231e04d"},{"introduced":"daac7c1da2f701f2e9ddee1da1457ce61660b581"},{"fixed":"42cef196d68dd8d48ceaab89b2c9e2edd2cecbe8"}],"database_specific":{"extracted_events":[{"introduced":"5.0.0-RC1"},{"fixed":"5.9.0-beta.1"},{"introduced":"4.0.0-RC1"},{"fixed":"4.17.0-beta.1"}],"source":"AFFECTED_FIELD"}},{"type":"GIT","repo":"https://github.com/nystudio107/craft-seomatic","events":[{"introduced":"a31f7d211b52d55d274c66a291310ceec64c733f"},{"last_affected":"a31f7d211b52d55d274c66a291310ceec64c733f"}],"database_specific":{"source":"CPE_STRING","cpe":"cpe:2.3:a:craftcms:craft_cms:4.0.0:-:*:*:*:*:*:*","extracted_events":[{"introduced":"4.0.0-NA"},{"last_affected":"4.0.0-NA"}]}}],"versions":["4.0.0-NA","4.0.0-rc1","4.0.0-rc2","4.0.0-rc3","5.0.0-NA","5.0.0-rc1","4.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28697.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}