Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
Twig (twig/twig, Packagist) versions before 3.26.0 are affected. A template name in a {% use %} tag can contain a single quote that breaks out of a PHP string in the compiled cache file, so a template author who can supply that name can inject PHP code that runs when the cache file is loaded, even inside the Twig sandbox because {% use %} is always allowed. Upgrade to twig/twig 3.26.0, which escapes single quotes in compiled string literals.
Not analysed yet
We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.
Severity and exploitation
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 8.7 | High | 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | CNA (GitHub_M) |
- CISA KEV Not listed.
- EPSS 0.0077, the 56th percentile, on 14 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 20 May 2026, 07:44 UTC Published by the maintainers as a GitHub repository advisory
- 21 May 2026, 21:24 UTC Confirmed by GitHub Advisory Database
- 14 Jul 2026, 21:14 UTC Confirmed by the CVE List
- 14 Jul 2026, 22:16 UTC Confirmed by NVD
- 31 Oct 2026, 14:02 UTC First seen by agentprime
- 31 Oct 2026, 14:02 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-7p85-w9px-jpjp
- OSV: GHSA-7p85-w9px-jpjp
- github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp
- nvd.nist.gov/vuln/detail/CVE-2026-46633
- github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8
- github.com/twigphp/Twig/commit/a2c6db7ea7d2c90923e6708019ec1442526d1c30
- github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3
- gist.github.com/vladko312/d61b950f168c791db4786b83dc7a81e6
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46633.yaml
- github.com/twigphp/Twig
- github.com/twigphp/Twig/releases/tag/v3.26.0
- symfony.com/cve-2026-46633