p PatchFirst

PatchFirst · Vulnérabilités récentes

Vulnérabilités de twig/twig

Vulnérabilité publiée pour twig/twig au cours des 30 derniers jours : 0. Dans le catalogue KEV : 0.

Filtrer les vulnérabilités
Effacer les filtres

Vulnérabilités : 24

  1. CVE-2026-48807

    Élevée · CVSS 7.1EPSS 0,37%Correctif disponible

    Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters

    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 coerced to strings without consulting the sandbox policy. This issue is fixed in version 3.27.0.

    • Mettez à jour vers 3.27.0
    Publication Mise à jour
  2. CVE-2026-48806

    Élevée · CVSS 7.1EPSS 0,42%Correctif disponible

    Twig: Sandbox `__toString()` policy bypass via dynamic mapping keys

    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::ensureToStringAllowed(). This issue is fixed in version 3.27.0.

    • Mettez à jour vers 3.27.0
    Publication Mise à jour
  3. CVE-2026-48808

    Moyenne · CVSS 6EPSS 0,41%Correctif disponible

    Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`

    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 author can read public or magic properties not allowed by the sandbox policy. This issue is fixed in version 3.27.0.

    • Mettez à jour vers 3.27.0
    Publication Mise à jour
  4. CVE-2026-48805

    Moyenne · CVSS 5.3EPSS 0,48%Correctif disponible

    Twig: Sandbox state regression in deprecated internal wrappers in `src/Resources/core.php`

    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(), twig_array_every(), and twig_check_arrow_in_sandbox() to bypass sandbox callable restrictions. This issue is fixed in version 3.27.0.

    • Mettez à jour vers 3.27.0
    Publication Mise à jour
  5. CVE-2026-49981

    Moyenne · CVSS 6EPSS 0,36%Correctif disponible

    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.

    • Mettez à jour vers 3.27.0
    Publication Mise à jour
  6. CVE-2026-46638

    Moyenne · CVSS 6EPSS 0,47%Correctif disponible

    Twig: `{% sandbox %}{% include %}` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411)

    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 should have been denied by SecurityPolicy::checkSecurity(). This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  7. CVE-2026-46640

    Élevée · CVSS 8.7EPSS 0,64%Correctif disponible

    Twig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilation

    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 emitted into the generated template source and executed at template-load time. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  8. CVE-2026-47730

    Moyenne · CVSS 5.1EPSS 0,29%Correctif disponible

    Twig: XSS in profiler HtmlDumper via unescaped template and profile names

    Twig is a template language for PHP. From 3.0.0 until 3.26.0, Twig\Profiler\Dumper\HtmlDumper writes Profile::getTemplate() and Profile::getName() into HTML output without escaping, allowing attacker-controlled template or profile names to inject arbitrary HTML when a browser renders the profiler dump. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  9. CVE-2026-46628

    Moyenne · CVSS 5.1EPSS 0,29%Correctif disponible

    Twig: The `spaceless` filter implicitly marks its output as safe

    Twig is a template language for PHP. Prior to 3.26.0, the deprecated spaceless filter is registered as safe for HTML, causing Twig autoescaping to emit attacker-controlled markup unescaped when spaceless is applied to untrusted input. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  10. CVE-2026-46634

    Élevée · CVSS 7.7EPSS 0,62%Correctif disponible

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

    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.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  11. CVE-2026-46633

    Élevée · CVSS 8.7EPSS 0,69%Code d’exploitation publicCorrectif disponible

    Twig: PHP code injection via `{% use %}` template name

    Twig is a template language for PHP. 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 terminate the string and inject arbitrary PHP expressions into the compiled cache file. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  12. CVE-2026-46639

    Élevée · CVSS 7.1EPSS 0,39%Correctif disponible

    Twig: Sandbox property and method bypass via object-destructuring assignment

    Twig is a template language for PHP. From 3.24.0 until 3.26.0, object-destructuring assignment compiles CoreExtension::getAttribute() with the sandbox argument hardcoded to false, disabling property and method policy checks and allowing an attacker with write access to a sandboxed Twig template to read public properties or invoke public getters on objects passed to the template engine. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  13. CVE-2026-46635

    Moyenne · CVSS 5.3EPSS 0,33%Correctif disponible

    Twig: Sandbox property allowlist bypass via the `column` filter (array_column on objects)

    Twig is a template language for PHP. Prior to 3.26.0, the column filter passes object arrays to PHP array_column(), which reads public and magic properties without reaching CoreExtension::getAttribute() or SandboxExtension::checkPropertyAllowed(), allowing an untrusted template author with column in allowedFilters to read properties that are not in the sandbox allowlist. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  14. CVE-2026-47732

    Élevée · CVSS 7.1EPSS 0,4%Correctif disponible

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

    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.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  15. CVE-2026-24425

    Élevée · CVSS 8.7EPSS 0,76%Correctif disponible

    Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface

    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. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.

    • Mettez à jour vers 3.26.0
    Publication Mise à jour
  16. CVE-2025-24374

    Moyenne · CVSS 4.3EPSS 0,29%Correctif disponible

    Twig fixes a security issue where escaping was missing when using null coalesce operator (??)

    Twig is a template language for PHP. When using the ?? operator, output escaping was missing for the expression on the left side of the operator. This vulnerability is fixed in 3.19.0.

    • Mettez à jour vers 3.19.0
    Publication Mise à jour
  17. CVE-2024-51754

    Faible · CVSS 2.2EPSS 0,43%Correctif disponible

    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.

    • Mettez à jour vers 3.11.2
    • Mettez à jour vers 3.14.1
    Publication Mise à jour
  18. CVE-2024-51755

    Faible · CVSS 2.2EPSS 0,43%Correctif disponible

    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.

    • Mettez à jour vers 3.11.2
    • Mettez à jour vers 3.14.1
    Publication Mise à jour
  19. CVE-2024-45411

    Élevée · CVSS 8.6EPSS 0,85%Correctif disponible

    Twig has a possible sandbox bypass

    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.

    • Mettez à jour vers 1.44.8
    • Mettez à jour vers 2.16.1
    • Mettez à jour vers 3.11.1
    • Mettez à jour vers 3.14.0
    Publication Mise à jour
  20. GHSA-7cvr-xhm5-x998

    Moyenne · CVSS 5.3Correctif disponible

    Twig Path Traversal vulnerability in the filesystem loader

    Twig is affected by path traversal vulnerability when used with Twig_Loader_Filesystem for loading Twig templates but only if the application is using non-trusted template names (names provided by a end-user for instance). When affected, it is possible to go up one directory for the paths configured in the application's loader. For instance, if the filesystem loader is configured with /path/to/templates as a path to look for templates, an attacker can force Twig to include a file stored in /path/to by prepending the path with /../ like in {% include "/../somefile_in_path_to" %} Note that using anything else (like ../somefile, /../../somefi

    • Mettez à jour vers 1.12.3
    Publication Mise à jour

Vérifiez votre serveur

Comparez votre pile et les versions installées aux bases de vulnérabilités actuelles.

Vérifiez votre serveur →