Craft has a Twig Function Blocklist Bypass
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
craftcms/cmsPackagist | >= 5.0.0-RC1, < 5.9.0-beta.1 | 5.9.0-beta.1 |
craftcms/cmsPackagist | >= 4.0.0-RC1, < 4.17.0-beta.1 | 4.17.0-beta.1 |
Affected products
2Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-5fvc-7894-ghp4ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-28783ghsaADVISORY
- github.com/craftcms/cms/pull/18208ghsax_refsource_MISCWEB
- github.com/craftcms/cms/security/advisories/GHSA-5fvc-7894-ghp4ghsax_refsource_CONFIRMWEB
- github.com/twigphp/Twig/blob/946ddeafa3c9f4ce279d1f34051af041db0e16f2/src/Extension/CoreExtension.phpghsaWEB
News mentions
0No linked articles in our index yet.