Bug 2528956 (CVE-2026-46636) - CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls
Summary: CVE-2026-46636 php-twig: Twig: Sandbox bypass allows unauthorized method calls
Keywords:
Status: NEW
Alias: CVE-2026-46636
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2533279
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-04 22:11 UTC by OSIDB Bzimport
Modified: 2026-09-14 18:26 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-09-04 22:11:25 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.