CVE-2026-28697Craft Affected by Authenticated RCE via "craft.app.fs.write()" in Twig Templates
Updated under an hour ago ()
Does this affect you?
It affects craftcms cms and 1 other product. Add what you run to find out whether that includes you.
No exploitation reported and no EPSS estimate yet.
Do this next
Free account, 1 product
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.
- CVSS
- 9.4 CRITICAL (v4.0, CNA)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
- Weakness (CWE)
- CWE-1336
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- Not loaded for this CVE
- Assigned by
- GitHub_M
- NVD analysis
- Analyzed
- Record last updated
- Mar 6, 2026
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
craftcms cms craftcms:cms (from the name) | from 5.0.0-RC1, < 5.9.0-beta.1; from 4.0.0-RC1, < 4.17.0-beta.1 | CNA record |
craftcms craft_cms craftcms:craft_cms | after 4.0.0 before 4.17.0; after 5.0.0 before 5.9.0; 4.0.0; 4.0.0; 4.0.0; 4.0.0; 5.0.0; 5.0.0 | NVD |
References
- https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68xx-refsource-confirm, exploit, mitigation, patch, vendor-advisory
- https://github.com/craftcms/cms/pull/18216x-refsource-misc, issue-tracking, patch
- https://github.com/craftcms/cms/pull/18219x-refsource-misc, issue-tracking, patch
- https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197x-refsource-misc, patch
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.