Skip to main content
Vulnerability Database/CVE-2026-112771

CVE-2026-112771: Craft CMS Information Disclosure Flaw

CVE-2026-112771 is an information disclosure vulnerability in Craft CMS affecting versions 4.0.0-4.18.7 and 5.0.0-5.10.x. Attackers can exploit Twig sandbox bypass to access sensitive data. This article covers technical details, affected versions, impact assessment, and remediation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-112771 Overview

Craft CMS contains a Twig sandbox allowlist bypass that permits authenticated Control Panel users to disclose sensitive configuration data. The flaw affects Craft CMS versions 4.0.0 before 4.18.8 and 5.0.0 before 5.11.0. The column, contains, filterByValue, index, where, and multisort Twig filters resolve caller-supplied keys through ArrayHelper::getValue() without consulting the sandbox security policy. Attackers can supply dot-path keys to traverse the craft global object and exfiltrate the securityKey, database credentials, and authentication tokens. The vulnerability is classified under [CWE-200] Information Exposure.

Critical Impact

Authenticated Control Panel users can bypass the Twig sandbox to read application secrets, enabling further compromise of the Craft CMS deployment and connected databases.

Affected Products

  • Craft CMS 4.0.0 through 4.18.7
  • Craft CMS 5.0.0 through 5.10.x
  • Twig templates rendered within the Control Panel sandbox

Discovery Timeline

  • 2026-10-19 - CVE-2026-112771 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-112771

Vulnerability Analysis

Craft CMS exposes a set of array-manipulation Twig filters that accept a key argument identifying which property to read from each element. These filters delegate key resolution to ArrayHelper::getValue(), a Yii utility that accepts dot-notation paths such as foo.bar.baz and walks nested objects or arrays. The Twig sandbox security policy, which normally restricts which properties and methods user-supplied templates may access, is never consulted during this traversal.

Authenticated Control Panel users who can author or edit Twig templates can therefore pass crafted dot-paths to filters like column, where, or filterByValue. These keys traverse the craft global and reach configuration objects that hold the application securityKey, database connection credentials, and session or authentication tokens. Because the filter returns the resolved value as part of its normal output, the sensitive data is rendered directly into template output.

Root Cause

The root cause is a missing policy check at the boundary between Twig filter arguments and the underlying property resolver. ArrayHelper::getValue() performs reflection-style lookups that the sandbox is designed to block, but the filters invoke it directly rather than routing property access through the sandbox's checkPropertyAllowed() path.

Attack Vector

An attacker needs a Control Panel account with permission to author Twig template content. They craft a filter invocation whose key argument is a dot-path, for example a column filter applied to an array containing the craft global with a key such as app.config.general.securityKey. Rendering the template returns the sensitive value. See the GitHub Security Advisory and the VulnCheck Advisory on Craft CMS for the specific filters and property paths involved.

Detection Methods for CVE-2026-112771

Indicators of Compromise

  • Twig templates or template revisions authored by Control Panel users that invoke column, contains, filterByValue, index, where, or multisort with dot-notation key arguments.
  • Audit log entries showing template edits followed by rendering of unusual string output in the Control Panel preview.
  • Outbound requests from the Craft CMS host carrying strings that resemble the application securityKey, database DSN, or session tokens.

Detection Strategies

  • Review Twig template content for filter calls whose key argument contains dots and references craft, app, config, db, or security.
  • Alert when Control Panel accounts without a template-authoring role modify Twig templates, which may indicate privilege misuse or account takeover.
  • Correlate template edits with subsequent authentication anomalies, such as session reuse from new source addresses that could follow securityKey disclosure.

Monitoring Recommendations

  • Enable Craft CMS audit logging for Control Panel template changes and ship logs to a centralized analytics platform.
  • Monitor web server access logs for POST requests to Control Panel template endpoints followed by GET requests that render those templates.
  • Rotate and monitor the securityKey and database credentials for use from unexpected hosts.

How to Mitigate CVE-2026-112771

Immediate Actions Required

  • Upgrade Craft CMS 4.x deployments to 4.18.8 or later and 5.x deployments to 5.11.0 or later.
  • Rotate the application securityKey, database credentials, and any API or auth tokens accessible from the craft global after patching.
  • Review all Control Panel accounts with template-authoring privileges and remove unnecessary access.

Patch Information

Craft CMS fixed the issue in versions 4.18.8 and 5.11.0 by routing filter key resolution through the Twig sandbox security policy. Full details are published in the GitHub Security Advisory GHSA-j697-8x93-7mp2.

Workarounds

  • Restrict Control Panel template-authoring permissions to a minimal set of trusted administrators until patching is complete.
  • Audit existing Twig templates and reject any that pass dot-notation keys to the affected filters.
  • Enforce multi-factor authentication on all Control Panel accounts to limit exploitation by compromised credentials.
bash
# Configuration example
composer require craftcms/cms:^5.11.0
# or for the 4.x branch
composer require craftcms/cms:^4.18.8
php craft migrate/all
php craft setup/security-key

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.