Read the docs
TI-2026-19691 Aliases CVE-2026-24425GHSA-2q52-x2ff-qgfr

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

Priority MEDIUM 41CWE-693Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Security bypass
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-693.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00758 55th percentileScored 2026-11-07
Fix Fixed Twig (twigphp): 3.26.0twig/twig (Packagist): 3.26.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonyTwig3.9.0 to before 3.26.0; all versions3.26.0Patch availableCNA
—twig/twig (Packagist)2.16.0 – 2.16.1—No fix listedGHSA-2q52-x2ff-qgfr
—twig/twig (Packagist)3.9.0 to before 3.26.03.26.0Patch availableGHSA-2q52-x2ff-qgfr
  • Twig Vendorsymfony Affected 3.9.0 to before 3.26.0; all versions Fixed in 3.26.0 Patch available CNA
  • twig/twig (Packagist) Vendor— Affected 2.16.0 – 2.16.1 Fixed in — No fix listed GHSA-2q52-x2ff-qgfr
  • twig/twig (Packagist) Vendor— Affected 3.9.0 to before 3.26.0 Fixed in 3.26.0 Patch available GHSA-2q52-x2ff-qgfr

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*2.16.0 – 2.16.1; 3.9.0 to before 3.26.0Vulnerablesymfony
  • cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* Versions 2.16.0 – 2.16.1; 3.9.0 to before 3.26.0 Vulnerable ·symfony

Remediation

  • Fix · CNA Twig (twigphp) Fixed in 3.26.0
  • Fix · GHSA-2q52-x2ff-qgfr twig/twig (Packagist) Fixed in 3.26.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-24425
  2. 2026-10-03 Alias added: GHSA-2q52-x2ff-qgfr

References

  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2022-18637 Twig may load a template outside a configured directory when using the filesystem loader CVSS 3.1HIGH 7.5
  • TI-2026-34292 Twig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilation CVSS 4.0HIGH 8.7
  • TI-2026-34285 Twig: PHP code injection via `{% use %}` template name CVSS 4.0HIGH 8.7
See all 24 →

Sources