CVE-2026-46633
Description
A flaw was found in Twig, a template language for PHP. This vulnerability occurs because the Compiler::string() function does not properly escape single quotes when processing a template name from a {% use %} tag within a PHP single-quoted string literal. A remote attacker could craft a malicious template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file, potentially leading to arbitrary code execution.
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.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.