CISA list

● Composer package

twig/twig

Twig/twig has 26 security advisories. The newest release any of them names as the fix is 3.27.0.

As of , twig/twig has 26 security advisories. The newest release any of them names as the fix is 3.27.0.

Your version, and the version to upgrade to

Find the row your installed version falls in. The second column is the first release after it that none of the advisories lists as affected; a release outside every row is one no advisory lists. That is what the advisories say, not a promise that a release is free of flaws.
If you runUpgrade toAdvisories
Before 3.27.03.27.026 advisories

Security advisories, newest first

Security advisories, newest first
AdvisoryWhat it isAffectsFixed inPublished
CVE-2026-49981GHSA-529h-vh3j-85hqTwig: Sandbox filter, tag and function allow-list bypass when sandbox state changes between renders for a cached `Template`High severityBefore 3.27.03.27.0
CVE-2026-46636Sandbox filter, tag and function allow-list bypass when sandbox state changes between rendersFrom 1.0.0 before 3.27.03.27.0
CVE-2026-48806GHSA-5v5v-ww74-355vTwig: Sandbox `__toString()` policy bypass via dynamic mapping keysModerate severityBefore 3.27.03.27.0
CVE-2026-48807GHSA-8x9c-rmqh-456cTwig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filtersModerate severityBefore 3.27.03.27.0
CVE-2026-48808GHSA-h8vq-8gpg-mhcgTwig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`Moderate severityBefore 3.27.03.27.0
CVE-2026-48805GHSA-p42q-9prx-q5wqTwig: Sandbox state regression in deprecated internal wrappers in `src/Resources/core.php`Low severityBefore 3.27.03.27.0
CVE-2026-46627Sandbox does not protect against resource exhaustionFrom 1.0.0 before 3.26.03.26.0
CVE-2026-46634GHSA-24x9-r6q4-q93wTwig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template nameModerate severityFrom 3.9.0 before 3.26.03.26.0
CVE-2026-47730GHSA-2g2g-8p8h-fgwmTwig: XSS in profiler HtmlDumper via unescaped template and profile namesLow severityFrom 3.0.0 before 3.26.03.26.0
CVE-2026-24425GHSA-2q52-x2ff-qgfrTwig: Possible sandbox bypass when using a source policyHigh severityFrom 3.9.0 before 3.26.0; From 2.16.0 before 3.0.03.26.0
CVE-2026-46640GHSA-45vw-wh46-2vx8Twig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilationHigh severityFrom 3.15.0 before 3.26.03.26.0
CVE-2026-46628GHSA-4j38-f5cw-54h7Twig: The `spaceless` filter implicitly marks its output as safeLow severityBefore 3.26.03.26.0
CVE-2026-46638GHSA-7fxw-r6jv-74c8Twig: `{% sandbox %}{% include %}` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411)Moderate severityBefore 3.26.03.26.0
CVE-2026-46633GHSA-7p85-w9px-jpjpTwig: PHP code injection via `{% use %}` template nameCritical severityFrom 1.0.0 before 3.26.03.26.0
CVE-2026-46639GHSA-mm6w-gr99-p3jjTwig: Sandbox property and method bypass via object-destructuring assignmentHigh severityFrom 3.24.0 before 3.26.03.26.0
CVE-2026-47732GHSA-pr2w-4gpj-cpq4Twig: Sandbox: multiple `__toString()` policy bypasses via unguarded string coercion pointsHigh severityBefore 3.26.03.26.0
CVE-2026-46635GHSA-vcc8-phrv-43wjTwig: Sandbox property allowlist bypass via the `column` filter (array_column on objects)Low severityBefore 3.26.03.26.0
CVE-2025-24374GHSA-3xg3-cgvq-2xwrTwig security issue where escaping was missing when using null coalesce operatorModerate severityFrom 3.16.0 before 3.19.03.19.0
CVE-2024-51754GHSA-6377-hfv9-hqf6Twig has unguarded calls to `__toString()` when nesting an object into an arrayLow severityFrom 3.12 before 3.14.1; Before 3.11.23.11.2, 3.14.1
CVE-2024-51755GHSA-jjxq-ff2g-95vhTwig has unguarded calls to `__isset()` and to array-accesses when the sandbox is enabledLow severityFrom 3.12 before 3.14.1; Before 3.11.23.11.2, 3.14.1
CVE-2024-45411GHSA-6j75-5wfj-gh66Twig has a possible sandbox bypassModerate severityFrom 3.12.0 before 3.14.0; From 3.0.0 before 3.11.1; From 2.0.0 before 2.16.1; From 1.0.0 before 1.44.81.44.8, 2.16.1, 3.11.1, 3.14.0
CVE-2022-39261GHSA-52m2-vc4m-jj33, DRUPAL-CORE-2022-016Twig may load a template outside a configured directory when using the filesystem loaderHigh severityFrom 3.0.0 before 3.4.3; From 2.0.0 before 2.15.3; From 1.0.0 before 1.44.71.44.7, 2.15.3, 3.4.3
CVE-2022-23614GHSA-5mv2-rx3q-4w2vCode injection in TwigHigh severityFrom 3.0.0 before 3.3.8; From 2.0.0 before 2.14.112.14.11, 3.3.8
CVE-2019-9942GHSA-vxrc-68xx-x48gTwig Sandbox Information DisclosureLow severityFrom 2.0.0 before 2.7.0; Before 1.38.01.38.0, 2.7.0
CVE-2015-7809GHSA-xw83-pwrm-9j74Twig remote code execution in templatesHigh severityBefore 1.20.01.20.0
GHSA-7cvr-xhm5-x998Twig Path Traversal vulnerability in the filesystem loaderModerate severityFrom 1.0.0 before 1.12.31.12.3

Other Composer packages

Sources
  • Package versions from the Drupal advisory database, Copyright 2025 Ackama (MIT License) (source). Licence: MIT License
  • Package advisories from the GitHub Advisory Database (CC BY 4.0). Version ranges are reworded as sentences (source). Licence: CC BY 4.0