Skip to main content

Duplicate Advisory: Craft CMS: Authenticated RCE through Twig sandbox escape

0
High
Published: 08/11/2026 (08/11/2026, 15:32:39 UTC)
Source: GCVE Database
Product: craftcms/cms

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

Packagistghsa
craftcms/cms
Affected versions
>=4.0.0-RC1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 18:22:54 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses