ADVISORIES

Vulnerability

CVE-2026-47732

Twig is a template language for PHP. Prior to 3.26.0, several Twig language constructs trigger PHP string coercion on a Stringable operand without consulting SecurityPolicy::checkMethodAllowed(), allowing a sandboxed template author to invoke __toString() on objects reachable in the render context through conditional expressions, comparison operators, tests, template-loading tags, dynamic attribute names, spread arguments, the do tag, and the .. range operator. This issue is fixed in version 3.26.0.

4 advisories report this vulnerability, across 3 ecosystems.

High severity All Debian 2Packagist 1Ubuntu 1

Advisories

  • DEBIAN-CVE-2026-47732

    Twig is a template language for PHP. Prior to 3.26.0, several Twig language constructs trigger PHP string coercion on a Stringable operand without consulting SecurityPolicy::checkMethodAllowed(), allowing a sandboxed…

    CVE-2026-47732 Debian Updated 25 October 2026
  • DSA-6311-1

    php-twig - security update

    CVE-2026-24425CVE-2026-46627CVE-2026-46628CVE-2026-46629 Debian Updated 20 November 2026
  • GHSA-pr2w-4gpj-cpq4

    Twig: Sandbox: multiple `__toString()` policy bypasses via unguarded string coercion points

    High CVE-2026-47732 Packagist Updated 10 September 2026
  • UBUNTU-CVE-2026-47732

    Twig is a template language for PHP. Prior to 3.26.0, several Twig language constructs trigger PHP string coercion on a Stringable operand without consulting SecurityPolicy::checkMethodAllowed(), allowing a sandboxed…

    CVE-2026-47732 Ubuntu Updated 17 October 2026

References