<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>twigphp Twig vulnerabilities · Patchminder</title>
 <id>https://patchminder.com/vendor/twigphp/twig/</id>
 <updated>2026-11-17T23:00:02Z</updated>
 <link href="https://patchminder.com/vendor/twigphp/twig/"></link>
 <link href="https://patchminder.com/vendor/twigphp/twig/feed.xml" rel="self"></link>
 <author>
  <name>Patchminder</name>
 </author>
 <entry>
  <title>CVE-2026-46636: Twig: Sandbox method allowlist bypass via `Markup` subclass</title>
  <id>https://patchminder.com/cve/cve-2026-46636/</id>
  <updated>2026-09-08T17:38:45Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46636/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-48807: Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters</title>
  <id>https://patchminder.com/cve/cve-2026-48807/</id>
  <updated>2026-07-15T12:50:42Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-48807/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-48806: Twig: Sandbox `__toString()` policy bypass via dynamic mapping keys</title>
  <id>https://patchminder.com/cve/cve-2026-48806/</id>
  <updated>2026-07-15T12:47:14Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-48806/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-48808: Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`</title>
  <id>https://patchminder.com/cve/cve-2026-48808/</id>
  <updated>2026-07-15T14:31:58Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-48808/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-48805: Twig: Sandbox state regression in deprecated internal wrappers in `src/Resources/core.php`</title>
  <id>https://patchminder.com/cve/cve-2026-48805/</id>
  <updated>2026-07-16T15:09:20Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-48805/"></link>
  <summary>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()…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46637: Twig: HTML-output filters in twig/* extras incorrectly declared `is_safe =&gt; [&#39;all&#39;]`</title>
  <id>https://patchminder.com/cve/cve-2026-46637/</id>
  <updated>2026-07-16T15:05:57Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46637/"></link>
  <summary>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 =&gt; [all], causing Twig to treat plain text or HTML output as safe in…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46638: Twig is a template language for PHP. Prior to 3.26.0, {% sandbox %}{% include %} can include a template that…</title>
  <id>https://patchminder.com/cve/cve-2026-46638/</id>
  <updated>2026-07-15T12:48:08Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46638/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46640: Twig: Arbitrary PHP code execution via `_self.(&lt;string&gt;)` macro-reference compilation</title>
  <id>https://patchminder.com/cve/cve-2026-46640/</id>
  <updated>2026-07-16T03:55:34Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46640/"></link>
  <summary>Twig is a template language for PHP. From 3.15.0 until 3.26.0, _self.(&lt;string&gt;) and import-alias dynamic attribute syntax can concatenate an attacker-controlled string into a MacroReferenceExpression name without…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46629: Twig: Unbounded formatter memoisation in twig/intl-extra keyed on template-controlled arguments</title>
  <id>https://patchminder.com/cve/cve-2026-46629/</id>
  <updated>2026-07-15T12:53:13Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46629/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-47730: Twig: XSS in profiler HtmlDumper via unescaped template and profile names</title>
  <id>https://patchminder.com/cve/cve-2026-47730/</id>
  <updated>2026-07-21T14:45:11Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-47730/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46628: Twig: The `spaceless` filter implicitly marks its output as safe</title>
  <id>https://patchminder.com/cve/cve-2026-46628/</id>
  <updated>2026-07-15T12:49:21Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46628/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46634: Twig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template name</title>
  <id>https://patchminder.com/cve/cve-2026-46634/</id>
  <updated>2026-07-29T18:26:17Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46634/"></link>
  <summary>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__&lt;hash&gt; name that can fall outside a SourcePolicyInterface sandbox…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46627: Twig: Sandbox resource exhaustion via unbounded `for` / `range()`</title>
  <id>https://patchminder.com/cve/cve-2026-46627/</id>
  <updated>2026-07-16T15:03:37Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46627/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46633: Twig: PHP code injection via `{% use %}` template name</title>
  <id>https://patchminder.com/cve/cve-2026-46633/</id>
  <updated>2026-11-04T00:01:29Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46633/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46639: Twig: Sandbox property and method bypass via object-destructuring assignment</title>
  <id>https://patchminder.com/cve/cve-2026-46639/</id>
  <updated>2026-07-15T12:54:34Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46639/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-46635: Twig: Sandbox property allowlist bypass via the `column` filter (array_column on objects)</title>
  <id>https://patchminder.com/cve/cve-2026-46635/</id>
  <updated>2026-07-15T13:26:27Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-46635/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-47732: Twig Sandbox: multiple `__toString()` policy bypasses via unguarded string coercion points</title>
  <id>https://patchminder.com/cve/cve-2026-47732/</id>
  <updated>2026-07-15T13:26:33Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-47732/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2026-24425: Twig 2.16.x &amp; 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface</title>
  <id>https://patchminder.com/cve/cve-2026-24425/</id>
  <updated>2026-11-17T23:00:02Z</updated>
  <link href="https://patchminder.com/cve/cve-2026-24425/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2025-24374: Twig fixes a security issue where escaping was missing when using null coalesce operator (??)</title>
  <id>https://patchminder.com/cve/cve-2025-24374/</id>
  <updated>2025-01-29T15:44:49Z</updated>
  <link href="https://patchminder.com/cve/cve-2025-24374/"></link>
  <summary>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.</summary>
 </entry>
 <entry>
  <title>CVE-2024-51754: Unguarded calls to __toString() when nesting an object into an array in Twig</title>
  <id>https://patchminder.com/cve/cve-2024-51754/</id>
  <updated>2025-05-29T09:03:17Z</updated>
  <link href="https://patchminder.com/cve/cve-2024-51754/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2024-51755: Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig</title>
  <id>https://patchminder.com/cve/cve-2024-51755/</id>
  <updated>2024-11-07T15:12:59Z</updated>
  <link href="https://patchminder.com/cve/cve-2024-51755/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2024-45411: Twig has a possible sandbox bypass</title>
  <id>https://patchminder.com/cve/cve-2024-45411/</id>
  <updated>2024-09-16T12:04:18Z</updated>
  <link href="https://patchminder.com/cve/cve-2024-45411/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2022-39261: Twig may load a template outside a configured directory when using the filesystem loader</title>
  <id>https://patchminder.com/cve/cve-2022-39261/</id>
  <updated>2025-04-23T16:54:59Z</updated>
  <link href="https://patchminder.com/cve/cve-2022-39261/"></link>
  <summary>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…</summary>
 </entry>
 <entry>
  <title>CVE-2022-23614: Code injection in Twig</title>
  <id>https://patchminder.com/cve/cve-2022-23614/</id>
  <updated>2025-04-23T19:08:27Z</updated>
  <link href="https://patchminder.com/cve/cve-2022-23614/"></link>
  <summary>Twig is an open source template language for PHP.</summary>
 </entry>
</feed>