CWE data temporarily unavailableCWE data is currently experiencing intermittent outages, which may cause incomplete section loading on CVE pages. We are actively working on a fix.

CVE-2026-46636

Description

A flaw was found in Twig, a template language for PHP. The SecurityPolicy::checkMethodAllowed() function unconditionally whitelists all method calls on instances of Twig\Markup and its subclasses. This allows an attacker, by passing an object of a Markup-derived class into a sandboxed template, to bypass the configured security policy. Consequently, all public methods of that subclass are inadvertently exposed to template authors, potentially leading to unauthorized actions or information disclosure.

Statement

This vulnerability is evaluated as an Important severity risk because it circumvents template sandbox restrictions, allowing untrusted users to execute public methods on exposed objects without prior privilege escalation. Under normal operation, triggering this behavior requires the host application to explicitly enable sandboxing while passing custom markup objects into the rendering context. Red Hat Enterprise products do not deploy this component in standard configurations, significantly curtailing exposure across supported environments.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Frequently Asked Questions

Want to get errata notifications? Sign up here.