p PatchFirst

PatchFirst · Vulnérabilités récentes

Vulnérabilités de php-twig

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

Filtrer les vulnérabilités
Effacer les filtres

Vulnérabilités : 19

  1. CVE-2026-46636

    Élevée · CVSS 8.7EPSS 0,57%Aucun correctif publié

    Twig: Sandbox method allowlist bypass via `Markup` subclass

    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 application that passes an object of a Markup-derived class into a sandboxed template (typically to mark a chunk of HTML as safe) inadvertently exposes every public method of that subclass to template authors, regardless of the configured allowedMethods list. This issue has been patched in version 3.27.0.

    Publication Mise à jour
  2. CVE-2026-48805

    Moyenne · CVSS 5.3EPSS 0,48%Aucun correctif publié

    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.

    Publication Mise à jour
  3. CVE-2026-49981

    Moyenne · CVSS 6EPSS 0,36%Aucun correctif publié

    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.

    Publication Mise à jour
  4. CVE-2026-46637

    Moyenne · CVSS 5.1EPSS 0,3%Correctif disponible

    Twig: HTML-output filters in twig/* extras incorrectly declared `is_safe => ['all']`

    Twig is a template language for PHP. Prior to 3.26.0, several filters in twig/markdown-extra and twig/cssinliner-extra are registered with is_safe => [all], causing Twig to treat plain text or HTML output as safe in HTML, JavaScript, CSS, URL, and other contexts where the output is not properly escaped. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.5.1-1+deb12u3
    Publication Mise à jour
  5. CVE-2026-46638

    Moyenne · CVSS 6EPSS 0,47%Aucun correctif publié

    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.

    Publication Mise à jour
  6. CVE-2026-46629

    Moyenne · CVSS 5.3EPSS 0,54%Correctif disponible

    Twig: Unbounded formatter memoisation in twig/intl-extra keyed on template-controlled arguments

    Twig is a template language for PHP. Prior to 3.26.0, twig/intl-extra memoises IntlDateFormatter and NumberFormatter instances in arrays keyed by template-controlled filter arguments such as locale, pattern, and attrs, allowing a template to allocate many ICU formatter objects that remain pinned for the lifetime of the Twig\Environment. This issue is fixed in version 3.26.0.

    • Mettez à jour vers 3.5.1-1+deb12u3
    Publication Mise à jour
  7. 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.5.1-1+deb12u3
    Publication Mise à jour
  8. 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.5.1-1+deb12u3
    Publication Mise à jour
  9. CVE-2026-46627

    Élevée · CVSS 7.1EPSS 0,54%Aucun correctif publié

    Twig: Sandbox resource exhaustion via unbounded `for` / `range()`

    Twig is a template language for PHP. Prior to 3.26.0, the Twig sandbox does not prevent a template from consuming CPU, memory, or wall-clock time, even under the strictest allow-list, allowing untrusted templates to cause resource exhaustion. This issue is addressed in version 3.26.0 by documenting that the sandbox does not protect against resource exhaustion.

    Publication Mise à jour
  10. 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.5.1-1+deb12u3
    Publication Mise à jour
  11. CVE-2026-46635

    Moyenne · CVSS 5.3EPSS 0,33%Aucun correctif publié

    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.

    Publication Mise à jour
  12. CVE-2026-47732

    Élevée · CVSS 7.1EPSS 0,4%Aucun correctif publié

    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.

    Publication Mise à jour
  13. 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.5.1-1+deb12u3
    Publication Mise à jour
  14. CVE-2024-51755

    Faible · CVSS 2.2EPSS 0,43%Aucun correctif publié

    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.

    Publication Mise à jour
  15. 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 3.5.1-1+deb12u1
    Publication Mise à jour
  16. CVE-2022-39261

    Élevée · CVSS 7.5EPSS 3,17%Correctif disponible

    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.

    • Mettez à jour vers 3.4.3-1
    Publication Mise à jour
  17. CVE-2022-23614

    Élevée · CVSS 8.8EPSS 8,21%Correctif disponible

    Code injection in Twig

    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 and could lead to code injection of arbitrary PHP code. Patched versions now disallow calling non Closure in the `sort` filter as is the case for some other filters. Users are advised to upgrade.

    • Mettez à jour vers 3.3.8-1
    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 →