<?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/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Twig - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/twig/</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/products/twig/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><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'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><item><title>Twig: PHP Code Injection via `{% use %}` Template Name (CVE-2026-46633)</title><link>https://feed.craftedsignal.io/briefs/2026-05-twig-code-injection/</link><pubDate>Thu, 21 May 2026 21:26:07 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-twig-code-injection/</guid><description>A code injection vulnerability (CVE-2026-46633) exists in Twig versions prior to 3.26.0, where a single quote in the `{% use %}` template name is not properly escaped, allowing arbitrary PHP code execution by bypassing the Twig sandbox.</description><content:encoded><![CDATA[<p>A critical code injection vulnerability, tracked as CVE-2026-46633, affects Twig versions before 3.26.0. The vulnerability stems from insufficient escaping of single quotes within the <code>Compiler::string()</code> function when handling template names in <code>{% use %}</code> tags. Specifically, the <code>Compiler::string()</code> function escapes characters like <code>&quot;</code> and <code>$</code> but fails to escape single quotes, which are later used within a PHP single-quoted string literal in <code>ModuleNode::compileConstructor()</code>. This oversight allows an attacker to inject arbitrary PHP code by including a single quote in the template name passed to the <code>{% use %}</code> tag. The injected code is then executed when the compiled Twig cache file is loaded, bypassing the configured <code>SecurityPolicy</code> and leading to remote code execution. The <code>{% use %}</code> tag is unconditionally allowed regardless of the <code>allowedTags</code> configuration, making this vulnerability reachable even from sandboxed templates.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a malicious Twig template containing a <code>{% use %}</code> tag.</li>
<li>The template name within the <code>{% use %}</code> tag includes a single quote followed by arbitrary PHP code, e.g., <code>{% use 'x' . phpinfo() . 'y' %}</code>.</li>
<li>The Twig template is rendered using a vulnerable version of Twig (&lt;3.26.0).</li>
<li>During compilation, the <code>ModuleNode::compileConstructor()</code> function processes the <code>{% use %}</code> tag and uses <code>Compiler::string()</code> to escape the template name.</li>
<li><code>Compiler::string()</code> fails to escape the single quote, allowing the attacker to break out of the surrounding PHP single-quoted string literal.</li>
<li>The malicious PHP code is written into the compiled Twig cache file.</li>
<li>The compiled Twig cache file is loaded by the PHP engine during subsequent template renderings.</li>
<li>The injected PHP code executes within the PHP process, bypassing the Twig sandbox and achieving remote code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to execute arbitrary PHP code on the server hosting the Twig application. Given that the Twig sandbox is bypassed, attackers can perform a wide range of malicious actions, including reading sensitive files, modifying application data, and potentially gaining full control of the server. This vulnerability affects applications using Twig versions prior to 3.26.0.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Twig version 3.26.0 or later to patch CVE-2026-46633.</li>
<li>Deploy the following Sigma rule to detect potential exploitation attempts by monitoring for the <code>use</code> tag containing a single quote (').</li>
<li>Review existing Twig templates for any instances of user-controlled input being used in <code>{% use %}</code> tags and sanitize the input to prevent code injection.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>code-injection</category><category>twig</category><category>rce</category></item><item><title>Drupal Core PostgreSQL SQL Injection Vulnerability (CVE-2026-9082) Exploit Available</title><link>https://feed.craftedsignal.io/briefs/2026-05-drupal-sqli/</link><pubDate>Thu, 21 May 2026 11:02:28 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-drupal-sqli/</guid><description>A public exploit is available for CVE-2026-9082, a SQL injection vulnerability in Drupal Core affecting PostgreSQL-backed sites running versions 8.0 through 11.3.9, allowing unauthenticated users to potentially achieve data exfiltration, privilege escalation, and remote code execution.</description><content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p>A proof-of-concept exploit has been published for CVE-2026-9082, a critical SQL injection vulnerability affecting Drupal Core when using a PostgreSQL database backend. The vulnerability impacts Drupal versions 8.0.0 through 11.3.9. The vulnerability resides in the PostgreSQL Entity Query Condition handler. The issue can be exploited by unauthenticated users through the JSON:API module, which is enabled by default since Drupal 9. Successful exploitation could lead to unauthorized data access, privilege escalation, and potentially remote code execution in certain server configurations. The existence of a public exploit increases the risk to unpatched Drupal installations.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An unauthenticated attacker sends a crafted HTTP request to a vulnerable Drupal server using the JSON:API endpoint.</li>
<li>The request includes malicious SQL code embedded within the array keys of the filter conditions in the URL parameters.</li>
<li>Drupal's PostgreSQL Entity Query Condition handler processes the request and iterates over the provided array keys.</li>
<li>The <code>translateCondition()</code> method constructs PDO placeholder names using the attacker-controlled array keys.</li>
<li>Due to insufficient sanitization, the malicious SQL code is injected into the PDO placeholder name.</li>
<li>The injected SQL code bypasses the intended query sanitization mechanisms.</li>
<li>The database executes the injected SQL code, allowing the attacker to manipulate database queries.</li>
<li>The attacker can extract sensitive data, escalate privileges, or potentially execute arbitrary code on the server (RCE) in certain configurations.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-9082 can lead to significant consequences for affected Drupal websites. Attackers can exfiltrate sensitive data from the database, including user credentials, personally identifiable information (PII), and other confidential data. Privilege escalation allows attackers to gain administrative access to the Drupal site, enabling them to modify content, install malicious modules, or compromise the entire server. In some server configurations, the vulnerability can be leveraged to achieve remote code execution (RCE), granting the attacker complete control over the system. Given the broad usage of Drupal, a successful widespread attack could impact numerous organizations across various sectors.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the patches provided in Drupal SA-CORE-2026-004 to address CVE-2026-9082. Upgrade to Drupal Core versions 11.3.10, 11.2.12, 10.6.9, or 10.5.10 depending on your current branch to remediate the vulnerability.</li>
<li>Monitor web server logs for suspicious HTTP requests targeting the JSON:API endpoint (<code>/jsonapi</code>) with unusual filter parameters containing SQL metacharacters, as described in the Attack Chain (webserver category).</li>
<li>Deploy the Sigma rule &quot;Detect CVE-2026-9082 Exploitation Attempt — Drupal SQL Injection via JSON:API&quot; to detect potential exploitation attempts in real-time.</li>
<li>Block access to the identified malicious Git repository URL (<code>https://github.com/7h30th3r0n3/CVE-2026-9082-Drupal-PoC.git</code>) to prevent internal systems from downloading the exploit code (IOC).</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">threat</category><category>cve</category><category>sql injection</category><category>drupal</category><category>web application</category></item></channel></rss>