VDB

CVE-2026-24425

CVE-2026-24425 PUBLISHED CVSS 8.7 HIGH

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

Reported by vulncheck · Published May 20, 2026

twig/twig is fixed in 3.26.0 and 2.16.1 (Packagist)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
twig/twigPackagist3.26.0, 2.16.1
twigsymfony3.26.0, 2.16.1
Twigtwigphp3.26.0

Risk scores

CVSS 4.0
8.7
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected products

VendorProductVersions
twigphpTwig3.9.0, 2.16.0
twigtwig2.16.0, 3.9.0
twigphpTwig3.9.0, 2.16.0
symfonytwig3.9.0

Timeline

  • May 20, 2026 PoC Published (3 in total, the first dated here)
  • May 20, 2026 CVE Published
  • May 21, 2026 EPSS Score (30 in total, the first dated here)
  • May 21, 2026 Coalition ESS Score
  • May 25, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-24425
vulnetix vdb fixes CVE-2026-24425

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-24425/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›