{
  "id": "CVE-2026-28697",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-28697",
  "published_at": "2026-03-04T16:26:37.476Z",
  "title": "Craft Affected by Authenticated RCE via \"craft.app.fs.write()\" in Twig Templates",
  "vendor": "craftcms",
  "product": "cms",
  "cvss": {
    "score": 9.4,
    "source": "cna",
    "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"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-1336",
  "cpes": [
    "cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*",
    "cpe:2.3:a:craftcms:craft_cms:4.0.0:-:*:*:*:*:*:*",
    "cpe:2.3:a:craftcms:craft_cms:4.0.0:rc1:*:*:*:*:*:*",
    "cpe:2.3:a:craftcms:craft_cms:4.0.0:rc2:*:*:*:*:*:*",
    "cpe:2.3:a:craftcms:craft_cms:4.0.0:rc3:*:*:*:*:*:*",
    "cpe:2.3:a:craftcms:craft_cms:5.0.0:-:*:*:*:*:*:*",
    "cpe:2.3:a:craftcms:craft_cms:5.0.0:rc1:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.4,
    "nvd": 9.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "craftcms",
        "product": "cms",
        "ranges": [
          "\u003e= 5.0.0-RC1, \u003c 5.9.0-beta.1",
          "\u003e= 4.0.0-RC1, \u003c 4.17.0-beta.1"
        ],
        "fixed_in": [
          "5.9.0-beta.1",
          "4.17.0-beta.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade cms to 5.9.0-beta.1 or 4.17.0-beta.1 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/craftcms/cms/security/advisories/GHSA-v47q-jxvr-p68x"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/craftcms/cms/pull/18216"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/craftcms/cms/pull/18219"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/craftcms/cms/commit/9dc2a4a3ec8e9cd5e8c0d1129f36371437519197"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
