CVE-2026-46636
published 2026-09-04CVE-2026-46636: Twig is a template language for PHP. From version 1.0.0 to before version 3.27.0, SecurityPolicy::checkMethodAllowed() unconditionally whitelists all method…
PriorityP354high8.7CVSS 4.0
AVNACLATNPRNUINVCHVINVANSCNSINSANEXCRXIRXARXMAVXMACXMATXMPRXMUIXMVCXMVIXMVAXMSCXMSIXMSAXSXAUXRXVXREXUX
EPSS
0.57%
44.8th percentile
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
1 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| twigphp | twig | — | — |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls [fedora-all]
bugzilla·2026-09-14·CVSS 8.7
CVE-2026-46636 [HIGH] CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls [fedora-all]
CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls [fedora-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
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
Bugzilla
CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls
bugzilla·2026-09-04·CVSS 8.7
CVE-2026-46636 [HIGH] CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls
CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls
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.
http://github.com/twigphp/Twig/releases/tag/v3.27.0https://github.com/twigphp/Twig/security/advisories/GHSA-64jr-qjx4-w2fhhttps://security-tracker.debian.org/tracker/CVE-2026-46636https://security-tracker.debian.org/tracker/DSA-6311-1https://symfony.com/blog/cve-2026-46636-sandbox-filter-tag-and-function-allow-list-bypass-when-sandbox-state-changes-between-renders
2026-09-04
Published