CyberSecBulletin

Twigphp vulnerabilities

We track 14 vulnerabilities in Twigphp products. 14 are rated high or critical, and none are known to be exploited. The most recent was published on September 4, 2026.

14vulnerabilities
7critical
7high
0exploited
8.9average CVSS score

Latest Twigphp vulnerabilities

  • 8.7 High severity

    Twig: Improper Neutralization of Special Elements Used in a Template Engine

    CVE-2026-46636Twigphp

    Twig is a template language for PHP. From version 1.0.0 to before version 3.27.0, SecurityPolicy::checkMethodAllowed() unconditionally whitelists all method calls on instances of Twig\Markup. Twig\Markup is not final, so subclasses inherit the bypass. An appli

  • 8.2 High severity

    Twig: Protection Mechanism Failure

    CVE-2026-49981Twigphp

    Twig 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 sandboxe

  • 7.5 High severity

    Twig: Protection Mechanism Failure

    CVE-2026-48808Twigphp

    Twig is a template language for PHP. Prior to 3.27.0, the column filter passes the active sandbox state as a boolean but does not forward the current Source to SandboxExtension::checkPropertyAllowed(), so SourcePolicyInterface decisions are lost and a template

  • 9.1 Critical severity

    Twig: Protection Mechanism Failure

    CVE-2026-48807Twigphp

    Twig is a template language for PHP. Prior to 3.27.0, the sandbox __toString() checks do not fully cover Traversable values passed to join and replace filters or operands evaluated by the in and not in operators, allowing contained Stringable objects to be coe

  • 9.1 Critical severity

    Twig: Protection Mechanism Failure

    CVE-2026-48806Twigphp

    Twig is a template language for PHP. Prior to 3.27.0, ArrayExpression does not guard dynamic mapping keys that are coerced to strings, allowing PHP to invoke __toString() on a Stringable object used as a mapping key without calling SandboxExtension::ensureToSt

  • 9.1 Critical severity

    Twig: Protection Mechanism Failure

    CVE-2026-48805Twigphp

    Twig is a template language for PHP. Prior to 3.27.0, deprecated internal wrappers in src/Resources/core.php do not forward the current sandbox state to CoreExtension::checkArrow(), arraySome(), and arrayEvery(), allowing legacy calls such as twig_array_some()

  • 8.8 High severity

    Twig: Improper Control of Generation of Code

    CVE-2026-46640Twigphp

    Twig is a template language for PHP. From 3.15.0 until 3.26.0, _self.(<string>) and import-alias dynamic attribute syntax can concatenate an attacker-controlled string into a MacroReferenceExpression name without identifier validation, causing raw PHP to be em

  • 8.1 High severity

    Twig: Protection Mechanism Failure

    CVE-2026-46638Twigphp

    Twig is a template language for PHP. Prior to 3.26.0, {% sandbox %}{% include %} can include a template that was previously loaded outside the sandbox without re-invoking checkSecurity(), allowing the cached template to use tags, filters, and functions that sh

  • 9.8 Critical severity

    Twig: Protection Mechanism Failure

    CVE-2026-46634Twigphp

    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 tha

  • 9.8 Critical severity

    Twig: Improper Control of Generation of Code

    CVE-2026-46633Twigphp

    Twig is a template language for PHP. Starting in 1.15.1 and prior to 3.26.0, Compiler::string() does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal, allowing a crafted template name to ter

  • 9.9 Critical severity

    Twig: Protection Mechanism Failure

    CVE-2026-24425Twigphp

    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. Attacke

  • 8.6 High severity

    Twig: Protection Mechanism Failure

    CVE-2024-45411Twigphp

    Twig is a template language for PHP. Under some circumstances, the sandbox security checks are not run which allows user-contributed templates to bypass the sandbox restrictions. This vulnerability is fixed in 1.44.8, 2.16.1, and 3.14.0.

  • 7.5 High severity

    Twig: Improper Limitation of a Pathname to a Restricted Directory

    CVE-2022-39261TwigphpEPSS 3.17%

    Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads templates for which the name is a user input. It is possible to use the `source` or `include` sta

  • 9.8 Critical severity

    Twig: Improper Control of Generation of Code

    CVE-2022-23614TwigphpEPSS 8.21%

    Twig is an open source template language for PHP. When in a sandbox mode, the `arrow` parameter of the `sort` filter must be a closure to avoid attackers being able to run arbitrary PHP functions. In affected versions this constraint was not properly enforced