Skip to main content
← All vulnerabilities
CVE-2026-46639GHSA-MM6W-GR99-P3JJ

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.26.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • twigphp Twig

    From 3.24.0 · fixed in 3.26.0

  • twig/twigPackagist

    From 3.24.0 · fixed in 3.26.0

References 2

GitHub · twigphp/Twig