# CVE-2026-28697: Craft Affected by Authenticated RCE via "craft.app.fs.write()" in Twig Templates

- Severity: Critical 9.4 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.17%, higher than 68% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-03T21:00:16.000Z
- Modified: 2026-06-17T10:28:55.610Z
- Also known as: GHSA-v47q-jxvr-p68x
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- craftcms cms: >= 5.0.0-RC1, < 5.9.0-beta.1; >= 4.0.0-RC1, < 4.17.0-beta.1
- craftcms/cms (Packagist): from 5.0.0-RC1 before 5.9.0-beta.1; from 4.0.0-RC1 before 4.17.0-beta.1
- craftcms craft_cms: from >4.0.0 before 4.17.0; from >5.0.0 before 5.9.0; 4.0.0; 5.0.0

## Every score

- GitHub_M: CVSS:4.0 9.4 Critical `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`
- GitHub: CVSS:4.0 Critical `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`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x> (exploit, mitigation, patch, vendor-advisory, web)
- <https://github.com/craftcms/cms/pull/18216> (issue-tracking, patch, web)
- <https://github.com/craftcms/cms/pull/18219> (issue-tracking, patch, web)
- <https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-28697> (advisory)
- <https://github.com/craftcms/cms> (package)

## Sources

- CVE List: [CVE-2026-28697](https://www.cve.org/CVERecord?id=CVE-2026-28697), CVE Terms of Use, modified 2026-03-06
- GitHub Advisory Database: [GHSA-v47q-jxvr-p68x](https://github.com/advisories/GHSA-v47q-jxvr-p68x), CC-BY-4.0, modified 2026-03-04
- NVD: [CVE-2026-28697](https://nvd.nist.gov/vuln/detail/CVE-2026-28697), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-28697 · Whole record: https://cve.day/CVE-2026-28697.json · Rebuilt by cve.day 2026-11-25T22:59:15.178Z
