p PatchFirst

CVE-2026-46634

CVE-2026-46634 · Twig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template name

This page contains facts from public vulnerability sources. Check the original advisory before updating.

Twig is a template language for PHP. From 3.9.0 until 3.26.0, template_from_string() compiles an inner template under a synthesized __string_template__<hash> name that can fall outside a SourcePolicyInterface sandbox decision, allowing a sandboxed template that can call template_from_string and include to render an inner template without security policy enforcement. This issue is fixed in version 3.26.0.

CVSS 7.7 · High · EPSS 0.6% · Fix available

Published
Updated

Stack: system · php

Affected products and versions

  • twig

    Versions
    • >= 3.9.0, < 3.26.0: Affected

    No fix published

  • php-twig Debian:13

    Versions
    • 3.20.0-2
    • 3.21.1-1
    • 3.21.1-2
    • 3.21.1-3
    • 3.22.0-1
    • 3.22.0-2
    • 3.22.1-1
    • 3.22.1-2
    • 3.22.1-3
    • 3.22.2-1
    • 3.22.2-2
    • 3.23.0-1
    • 3.23.0-2
    • 3.24.0-1
    • 3.26.0-0+deb13u1
    • 3.26.0-1
    Affected ranges
    • ECOSYSTEM: < 3.27.0-0+deb13u1

    Update to 3.27.0-0+deb13u1

  • php-twig Debian:14

    Versions
    • 3.20.0-2
    • 3.21.1-1
    • 3.21.1-2
    • 3.21.1-3
    • 3.22.0-1
    • 3.22.0-2
    • 3.22.1-1
    • 3.22.1-2
    • 3.22.1-3
    • 3.22.2-1
    • 3.22.2-2
    • 3.23.0-1
    • 3.23.0-2
    • 3.24.0-1
    Affected ranges
    • ECOSYSTEM: < 3.26.0-1

    Update to 3.26.0-1

  • twig/twig Packagist

    Versions
    • v3.10.0
    • v3.10.1
    • v3.10.2
    • v3.10.3
    • v3.11.0
    • v3.11.1
    • v3.11.2
    • v3.11.3
    • v3.12.0
    • v3.13.0
    • v3.14.0
    • v3.14.1
    • v3.14.2
    • v3.15.0
    • v3.16.0
    • v3.17.0
    • v3.17.1
    • v3.18.0
    • v3.19.0
    • v3.20.0
    • v3.21.0
    • v3.21.1
    • v3.22.0
    • v3.22.1
    • v3.22.2
    • v3.23.0
    • v3.24.0
    • v3.25.0
    • v3.9.0
    • v3.9.1
    • v3.9.2
    • v3.9.3
    Affected ranges
    • ECOSYSTEM: ≥ 3.9.0, < 3.26.0

    Update to 3.26.0

  • php-twig Ubuntu:Pro:20.04:LTS

    Versions
    • 2.11.3-2
    • 2.12.1-1
    • 2.12.2-1
    • 2.12.3-1
    • 2.12.5-1
    • 2.12.5-1ubuntu0.1~esm1
    • 2.12.5-1ubuntu0.1~esm2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-twig Ubuntu:Pro:22.04:LTS

    Versions
    • 3.3.2-1ubuntu3
    • 3.3.4-1
    • 3.3.6-1
    • 3.3.7-1
    • 3.3.8-2ubuntu4
    • 3.3.8-2ubuntu4+esm1
    • 3.3.8-2ubuntu4+esm2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-twig Ubuntu:Pro:24.04:LTS

    Versions
    • 3.7.0-1
    • 3.7.1-1
    • 3.8.0-2
    • 3.8.0-2ubuntu0.1~esm1
    • 3.8.0-2ubuntu1
    • 3.8.0-2ubuntu1+esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-twig Ubuntu:25.10

    Versions
    • 3.20.0-2ubuntu1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-twig Ubuntu:26.10

    Versions
    • 3.23.0-2build7
    • 3.27.1-1
    • 3.28.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-twig Ubuntu:Pro:26.04:LTS

    Versions
    • 3.20.0-2ubuntu1
    • 3.23.0-2build5
    • 3.23.0-2build7
    • 3.23.0-2ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →