---
title: "CVE-2026-28697: Craft CMS Vulnerable to Authenticated RCE via \"craft.app.fs.write()\" in Twig Templates"
url: https://erroneo.us/security/cve/CVE-2026-28697/
description: "CVE-2026-28697 (craftcms/cms (Composer (PHP))): Craft is a content management system (CMS). Prior to 4.17.0-beta.1 and 5.9.0-beta.1, an authenticated…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-03-04
date_modified: 2026-03-06
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-28697"
kev: false
cvss: 9.4
epss: 0.01162
license: All rights reserved. Quote with attribution and a link.
---

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

**Signal:** Critical, preconditions apply. Severe if exploited, but exploitation needs conditions that may not apply to you. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 1.2% , percentile 67: FIRST’s model estimates a 1.2% chance of exploitation activity in the next 30 days, higher than 67% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Needs an account (high (admin)). Exposure depends on who can log in.
- Only applies if your dependency tree includes craftcms/cms (Composer (PHP)) >= 5.0.0-RC1, < 5.9.0-beta.1, fixed in 5.9.0-beta.1 ; craftcms/cms (Composer (PHP)) >= 4.0.0-RC1, < 4.17.0-beta.1, fixed in 4.17.0-beta.1 . Check your lockfile, including transitive dependencies.

## What it is

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 packages

- Composer (PHP) `craftcms/cms` >= 5.0.0-RC1, < 5.9.0-beta.1 → fixed: 5.9.0-beta.1
- Composer (PHP) `craftcms/cms` >= 4.0.0-RC1, < 4.17.0-beta.1 → fixed: 4.17.0-beta.1

## Affected products (CVE record)

- craftcms cms: >= 5.0.0-RC1, < 5.9.0-beta.1, >= 4.0.0-RC1, < 4.17.0-beta.1

## Severity

- GitHub_M CVSS 4.0: 9.4 `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: 9.4 `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`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 1.16% probability of exploitation activity in the next 30 days; percentile 67.

## Sources

- [GitHub Advisory GHSA-v47q-jxvr-p68x](https://github.com/advisories/GHSA-v47q-jxvr-p68x)
- [CVE.org record CVE-2026-28697](https://www.cve.org/CVERecord?id=CVE-2026-28697)
- [NVD entry CVE-2026-28697](https://nvd.nist.gov/vuln/detail/CVE-2026-28697)
- [github.com](https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x)
- [github.com](https://github.com/craftcms/cms/pull/18216)
- [github.com](https://github.com/craftcms/cms/pull/18219)
- [github.com](https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197)

---
Source page: https://erroneo.us/security/cve/CVE-2026-28697/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
