Duplicate Advisory: Craft CMS: Authenticated RCE through Twig sandbox escape
Description
Craft CMS versions 4.0.0-RC1 through before 4.18.3 and 5.0.0-RC1 through before 5.10.7 contain a remote code execution vulnerability via the Twig sandbox escape. An authenticated user with control panel access can exploit the vulnerability by rendering a malicious Twig template that abuses the yii\base\Component arbitrary function-call gadget, enabling arbitrary code execution even when the Twig sandbox is enabled.
CVSS v3.1
Score 8.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Craft CMS versions >=4.0.0-RC1 before 4.18.3 and >=5.0.0-RC1 before 5.10.7 have a remote code execution vulnerability in the Twig sandbox mechanism. The vulnerability arises because Craft marks the ElementInterface as safe via the AllowedInSandbox attribute, and the sandbox allowlisting extends to the entire class hierarchy (craft\base\Component up to yii\base\Component). This allows an authenticated attacker with control panel permissions to render a malicious Twig template that exploits the yii\base\Component arbitrary function-call gadget to execute arbitrary code, bypassing the Twig sandbox protections.
Potential Impact
An authenticated attacker with permission to access the Craft CMS control panel can execute arbitrary code on the server by exploiting this vulnerability. This can lead to full system compromise, data theft, or service disruption. The vulnerability affects confidentiality, integrity, and availability of the affected systems.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is confirmed, restrict control panel access to trusted users only and monitor for suspicious activity related to Twig template rendering.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h784-hpjp-2rrm
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a9845c9acd9273b496b0052
Added to database: 09/02/2026, 15:50:33 UTC
Last enriched: 09/07/2026, 18:22:54 UTC
Last updated: 10/04/2026, 04:34:45 UTC
Views: 92
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.