CVE-2026-46633
Twig is a template language for PHP. Prior to 3.26.0, …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46633.yaml
- symfony.com/cve-2026-46633
- github.com/advisories/GHSA-7p85-w9px-jpjp
- github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8
- github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3
- github.com/twigphp/Twig/releases/tag/v3.26.0
- gist.github.com/vladko312/d61b950f168c791db4786b83dc7a81e6
- nvd.nist.gov/vuln/detail/CVE-2026-46633
- cve.org/CVERecord?id=CVE-2026-46633
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.