Skip to content
OpenAdvisories
High · 7.1 CVE-2026-46639 EUVD-2026-44557GHSA-mm6w-gr99-p3jj

Twig: Sandbox property and method bypass via object-destructuring assignment

Published Jul 14, 2026 · Updated Jul 15, 2026 · Assigned by GitHub_M

Description

Twig is a template language for PHP. From 3.24.0 until 3.26.0, object-destructuring assignment compiles CoreExtension::getAttribute() with the sandbox argument hardcoded to false, disabling property and method policy checks and allowing an attacker with write access to a sandboxed Twig template to read public properties or invoke public getters on objects passed to the template engine. This issue is fixed in version 3.26.0.

Affected products

VendorProductAffectedFixed
twigphp Twig >= 3.24.0, < 3.26.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 php-twig 3.26.0-1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 php-twig No fix yet —
Ubuntu 25.10 php-twig No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS php-twig No fix yet —
Ubuntu Pro 24.04 LTS php-twig No fix yet —
Ubuntu Pro 22.04 LTS php-twig No fix yet —
Ubuntu Pro 20.04 LTS php-twig No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist twig/twig >= 3.24.0, < 3.26.0 3.26.0 GHSA-mm6w-gr99-p3jj

References