Skip to main content
← All vulnerabilities
CVE-2026-24425GHSA-2Q52-X2FF-QGFR

Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface

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: total

Summary

Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.

Timeline

  1. CVE published
  2. CISA SSVC assessment

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

  3. Record last updated

Affected versions

  • twigphp Twig

    From 3.9.0 · fixed in 3.26.0

  • twig/twigPackagist

    From 2.16.0 · through 2.16.1

  • twig/twigPackagist

    From 3.9.0 · fixed in 3.26.0

References 3

GitHub · twigphp/Twig

vulncheck.com