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
Red Hat Product Security has determined that this vulnerability does not affect any currently supported Red Hat product. This assessment may evolve based on further analysis and discovery. For more information about this vulnerability and the products it affects, please see the linked references.
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.
Understanding the Weakness (CWE)
Confidentiality
Technical Impact: Read Application Data
Integrity
Technical Impact: Execute Unauthorized Code or Commands
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.