1. Home
  2. Vulnerabilities
  3. CVE-2026-24425

CVE-2026-24425

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

Published 20 May 2026 · modified 17 Nov 2026 · Sources: NVD, CNA (vendor or assigner), EPSS (FIRST)

Medium 54/100

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.

Affected products and versions

twigphp (2 line(s))
twigphp
ProductVersionsFixed inSource
Twig from 3.9.0 (included) to 3.26.0 (excluded) — CNA (vendor or assigner)
Twig 2.16.0 — CNA (vendor or assigner)
Symfony (2 line(s))
Symfony
ProductVersionsFixed inSource
Twig from 2.16.0 (included) to 2.16.1 (included) — NVD
Twig from 3.9.0 (included) to 3.26.0 (excluded) — NVD

Fix

Not provided by the vendor.

Workaround

No workaround provided.

Check whether you are affected

No verification method provided.

Timeline

  1. — CVE published (cve)

References

Data provenance

Status
NVD
Publication date
NVD
Description
CNA (vendor or assigner)
CVSS score
NVD
Weakness (CWE)
CNA (vendor or assigner)
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H (CVSS 3.1, NVD)
Weakness
CWE-693 · Autre (CWE-693)

How this data is obtained and calculated