p PatchFirst

PatchFirst · Latest vulnerabilities

twig vulnerabilities

Vulnerabilities published for twig in the last 30 days: 0. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 7

  1. CVE-2026-49981

    Medium · CVSS 6EPSS 0.36%No fix published

    Twig: Sandbox filter, tag and function allow-list bypass when sandbox state changes between renders for a cached `Template`

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

    Published Updated
  2. CVE-2024-51754

    Low · CVSS 2.2EPSS 0.43%No fix published

    Unguarded calls to __toString() when nesting an object into an array in Twig

    Twig is a template language for PHP. In a sandbox, an attacker can call `__toString()` on an object even if the `__toString()` method is not allowed by the security policy when the object is part of an array or an argument list (arguments to a function or a filter for instance). This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.

    Published Updated
  3. CVE-2024-51755

    Low · CVSS 2.2EPSS 0.43%No fix published

    Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig

    Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.

    Published Updated
  4. CVE-2022-39261

    High · CVSS 7.5EPSS 3.17%Fix available

    Twig may load a template outside a configured directory when using the filesystem loader

    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` statement to read arbitrary files from outside the templates' directory when using a namespace like `@somewhere/../some.file`. In such a case, validation is bypassed. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.

    • Update to 2.4.6-1ubuntu0.1~esm1
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →