Vulnerability

CVE-2026-24425

highCVSS 4.0 8.7Published 20 May 2026

A plain-language summary of this CVE is being written; the description below is the NVD's own text.

Description

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

From the NVD's configuration data (CPE), vendor first.

  • Symfony twig

Weakness type

References

  • github.com /twigphp/Twig/releases/tag/v3.26.0
  • github.com /twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr
  • www.vulncheck.com /advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterfa…

Ingati scans your site every week and tells you when a CVE like this one affects something it found there.

Start scanning