CVE-2026-46636
Severity not reportedTwig is a template language for PHP.
Twig is a template language for PHP. From version 1.0.0 to before version 3.27.0, SecurityPolicy::checkMethodAllowed() unconditionally whitelists all method calls on instances of Twig\Markup. Twig\Markup is not final, so subclasses inherit the bypass. An application that passes an object of a Markup-derived class into a sandboxed template (typically to mark a chunk of HTML as safe) inadvertently exposes every public method of that subclass to template authors, regardless of the configured allowedMethods list. This issue has been patched in version 3.27.0.
Affected products
Not reported by the source (unknown — not "none").
Weakness classification (CWE)
Source: NVD / CISA. “NVD-CWE-Other” and “NVD-CWE-noinfo” mean NVD could not assign a specific weakness.
Mitigation & advisories
No vendor advisory or patch reference tagged by NVD. Check the references below.
References
- http://github.com/twigphp/Twig/releases/tag/v3.27.0 security-advisories@github.com
- https://github.com/twigphp/Twig/security/advisories/GHSA-64jr-qjx4-w2fh security-advisories@github.com
- https://security-tracker.debian.org/tracker/CVE-2026-46636 security-advisories@github.com
- https://security-tracker.debian.org/tracker/DSA-6311-1 security-advisories@github.com
- https://symfony.com/blog/cve-2026-46636-sandbox-filter-tag-and-function-allow-list-bypass-... security-advisories@github.com
