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

Critical 9.4 Published Updated

Attackers with admin access or specific permissions can bypass Twig function blocklists to execute arbitrary code, read files, or perform SSRF attacks.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-28783?

CVE-2026-28783 is a critical code injection vulnerability in Craftcms Craft Cms, published on 4 Mar 2026. An attacker needs administrator access to exploit it, with no action from the victim.

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

Weakness: CWE-94, CWE-184, CWE-1336

Which versions are affected by CVE-2026-28783?

4 open source packages ship an affected version, including craftcms/cms. It affects 1 product.

PackageAffectedFixed in
craftcms/cms PackagistFrom 4.0.0-RC14.17.0-beta.1
craftcms/cms PackagistFrom 4.0.0-RC14.17.0-beta.1
craftcms/cms PackagistFrom 5.0.0-RC15.9.0-beta.1
craftcms/cms PackagistFrom 5.0.0-RC15.9.0-beta.1

Products include Craftcms Craft Cms.

How do I fix CVE-2026-28783?

Upgrade craftcms/cms to a fixed version for your release line: 4.17.0-beta.1 or 5.9.0-beta.1.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-28783 being exploited?

There is no known exploitation of CVE-2026-28783 in the wild and no public exploit code.

All Craftcms Craft Cms vulnerabilities

Sources

Also known as GHSA-5fvc-7894-ghp4.

Is CVE-2026-28783 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free