Bug 2500756 (CVE-2026-46633)

Summary: CVE-2026-46633 twig/twig: Twig: Arbitrary code execution via crafted template name
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2500868, 2500869    
Bug Blocks:    

Description OSIDB Bzimport 2026-07-14 22:05:01 UTC
Twig is a template language for PHP. Prior to 3.26.0, Compiler::string() does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal, allowing a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. This issue is fixed in version 3.26.0.