{"id":"CVE-2026-46636","aliases":["CVE-2026-46636"],"related":[],"kind":"vulnerability","state":"published","title":"Twig: Sandbox method allowlist bypass via `Markup` subclass","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-09-04T22:07:35.122Z","modified":"2026-09-25T14:23:59.847Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"}],"cwes":["CWE-1336"],"affected":[{"ranges":[{"version":">= 1.0.0, < 3.27.0","status":"affected"}],"vendor":"twigphp","product":"Twig","source":"cvelist"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-64jr-qjx4-w2fh","tags":["x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-46636","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://security-tracker.debian.org/tracker/DSA-6311-1","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://symfony.com/blog/cve-2026-46636-sandbox-filter-tag-and-function-allow-list-bypass-when-sandbox-state-changes-between-renders","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"http://github.com/twigphp/Twig/releases/tag/v3.27.0","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-09-08T17:37:04.193Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46636","url":"https://www.cve.org/CVERecord?id=CVE-2026-46636","licence":"CVE Terms of Use","modified":"2026-09-08T17:38:45.651Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46636","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46636","licence":"Public domain","modified":"2026-09-25T14:23:59.847Z"}],"updatedAt":"2026-11-25T22:59:36.412Z","epss":{"score":0.00358,"percentile":0.31588,"date":"2026-12-01T12:00:22.000Z"}}