<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Cve-2026-46639 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/cve-2026-46639/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 21 May 2026 21:32:33 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/cve-2026-46639/feed.xml" rel="self" type="application/rss+xml"/><item><title>Twig Sandbox Bypass via Object Destructuring Assignment (CVE-2026-46639)</title><link>https://feed.craftedsignal.io/briefs/2026-05-twig-sandbox-bypass/</link><pubDate>Thu, 21 May 2026 21:32:33 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-twig-sandbox-bypass/</guid><description>A vulnerability in Twig versions 3.24.0 to 3.26.0 (CVE-2026-46639) allows an attacker with write access to a sandboxed Twig template to bypass security policy restrictions by exploiting object-destructuring assignment to read any public property or invoke any public getter on objects passed to the template engine.</description><content:encoded><![CDATA[<p>Twig versions 3.24.0 to 3.26.0 contain a sandbox bypass vulnerability (CVE-2026-46639) due to the object-destructuring assignment syntax introduced in version 3.24.0. This syntax generates a call to <code>CoreExtension::getAttribute()</code> with the <code>$sandboxed</code> argument hardcoded to <code>false</code>, effectively disabling property and method policy checks. An attacker with write access to a sandboxed Twig template can exploit this to read any public property or invoke any public getter on objects passed to the template engine, bypassing the intended <code>SecurityPolicy</code> restrictions. The exploit requires only the <code>{% do %}</code> tag to be in <code>allowedTags</code>, a common configuration in many Twig deployments. This bypass allows attackers to potentially gain sensitive information or execute arbitrary code depending on the objects passed to the template.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains write access to a Twig template file within a sandboxed environment.</li>
<li>The attacker injects a Twig template containing an object-destructuring assignment expression, such as <code>{% set { foo, bar } = my_object %}</code>.</li>
<li>The Twig template engine parses and compiles the modified template.</li>
<li>During compilation, the <code>ObjectDestructuringSetBinary::compile()</code> function is invoked.</li>
<li><code>ObjectDestructuringSetBinary::compile()</code> generates a call to <code>CoreExtension::getAttribute()</code> with the <code>$sandboxed</code> argument set to <code>false</code>.</li>
<li>When the template is rendered, the <code>getAttribute()</code> function is executed without enforcing the sandbox&rsquo;s property and method access restrictions.</li>
<li>The attacker is able to read public properties and invoke public getters of <code>my_object</code> that would normally be blocked by the <code>SecurityPolicy</code>.</li>
<li>The attacker leverages the ability to access sensitive data or trigger unintended behavior, potentially escalating privileges or gaining further access to the system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability (CVE-2026-46639) allows attackers to bypass the Twig sandbox, potentially leading to information disclosure or arbitrary code execution. The number of affected installations is unknown, but any Twig application using versions 3.24.0 to 3.26.0 with a sandboxed environment is vulnerable if an attacker can modify the template files. The primary impact is a loss of confidentiality and integrity within the application, as attackers can access sensitive data or modify application behavior.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Twig version 3.26.0 or later to patch CVE-2026-46639.</li>
<li>Implement strict access controls to prevent unauthorized modification of Twig template files.</li>
<li>Deploy the Sigma rule <code>Detect Twig Sandbox Bypass via getAttribute</code> to detect exploitation attempts based on the vulnerable <code>getAttribute()</code> calls.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>twig</category><category>sandbox-bypass</category><category>cve-2026-46639</category></item></channel></rss>