PatchSiren cyber security CVE debrief
CVE-2026-46633 twigphp CVE debrief
CVE-2026-46633 is a high-severity vulnerability in Twig, a template language for PHP. The vulnerability exists in the Compiler::string() method, which does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal. This allows a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. The CVE record was published on 2026-07-14T22:16:55.997Z and has not been modified since then. Developers and administrators using Twig should be aware of this vulnerability and take necessary actions to mitigate it.
- Vendor
- twigphp
- Product
- Twig
- CVSS
- HIGH 8.7
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-07-14
- Original CVE updated
- 2026-07-16
- Advisory published
- 2026-07-14
- Advisory updated
- 2026-07-16
Who should care
Developers and administrators using Twig, a template language for PHP, should be aware of this high-severity vulnerability. They should review their code and upgrade to version 3.26.0 or later to mitigate this vulnerability. Additionally, they should review and validate template names used in {% use %} tags and implement additional security measures to prevent template injection attacks.
Technical summary
CVE-2026-46633 is a high-severity vulnerability in Twig, a template language for PHP. Prior to version 3.26.0, the Compiler::string() method does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal. This allows a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. The vulnerability is fixed in version 3.26.0. Developers and administrators using Twig should upgrade to version 3.26.0 or later to mitigate this vulnerability.
Defensive priority
High
Recommended defensive actions
- Upgrade to Twig version 3.26.0 or later
- Review and validate template names used in {% use %} tags
- Implement additional security measures to prevent template injection attacks
- Review compensating controls for exposed systems while remediation is scheduled and verified
- Check relevant monitoring, detection, and logs for exposed assets that need extra review
- Track exceptions, retest remediated assets, and close the item only after evidence is documented
- Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
Evidence notes
The CVE record was published on 2026-07-14T22:16:55.997Z and has not been modified since then. The NVD entry is currently Analyzed. There are no additional details available about the vulnerability beyond what is provided in the CVE record and NVD entry.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-46633 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-46633
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-46633 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-46633
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8
[email protected] - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3
[email protected] - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/releases/tag/v3.26.0
[email protected] - Release Notes
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp
[email protected] - Vendor Advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.