CVE-2026-49981

NameCVE-2026-49981
DescriptionTwig is a template language for PHP. Prior to 3.27.0, the per-template filter, tag, and function allow-list verdict is computed when a Template instance is constructed and can remain cached after sandbox state changes between renders, allowing a later sandboxed render to reuse a template that was originally checked with a different or empty policy. This issue is fixed in version 3.27.0.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
php-twig (PTS)bullseye2.14.3-1+deb11u2vulnerable
bullseye (security)2.14.3-1+deb11u4vulnerable
bookworm, bookworm (security)3.5.1-1+deb12u3vulnerable
trixie (security), trixie3.27.0-0+deb13u1fixed
forky, sid3.27.1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
php-twigsourcetrixie3.27.0-0+deb13u1
php-twigsource(unstable)3.27.0-1

Notes

[bookworm] - php-twig <ignored> (Minor issue, too intrusive to backport)
https://github.com/twigphp/Twig/security/advisories/GHSA-529h-vh3j-85hq
https://github.com/twigphp/Twig/commit/23eb6eb1267cb0d303b91eb5cff9b0c559c538a4 (v3.27.0)
Duplicate of CVE-2026-46636

Search for package or bug name: Reporting problems