<?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>Marten - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/marten/</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, 17 Sep 2026 19:10:05 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/marten/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>SQL Injection in Marten LINQ Provider via Unescaped Literals</title><link>https://feed.craftedsignal.io/briefs/2026-09-marten-sql-injection/</link><pubDate>Thu, 17 Sep 2026 19:10:05 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-marten-sql-injection/</guid><description>Marten versions 7.0.0 through 9.12.0 contain critical SQL injection vulnerabilities in the LINQ provider and tenant-management internals, allowing attackers to perform unauthorized data access, multi-tenant bypass, and data modification via crafted dictionary keys or tenant IDs.</description><content:encoded><![CDATA[<p>Marten, a document database library for .NET using PostgreSQL, contains multiple SQL injection vulnerabilities (CVE-2026-75513) stemming from improper handling of runtime-influenced string inputs. The LINQ provider and tenant management internal components interpolate unsanitized strings directly into SQL queries as single-quoted literals. An attacker can break out of these literals by supplying input containing single quotes, leading to arbitrary SQL execution.</p>
<p>The primary attack vector involves supplying malicious dictionary keys within LINQ <code>Where</code> filters (e.g., <code>x.Attributes[key] == v</code>), enabling filter bypass and unauthorized cross-tenant data access. Additional vulnerable sinks include <code>Dictionary.ContainsKey</code> calls, projection selectors, tenant ID parameters in projection teardown, and DDL generation for database-scoped tenant partitions. If the application environment allows <code>;</code> delimited multi-statement queries, which is the default behavior of the underlying Npgsql driver, this vulnerability can facilitate data modification or destruction. Defenders should prioritize upgrading to patched versions immediately and audit code paths that pass user-supplied input to dictionary indexers or tenant-related functions.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies an application endpoint that uses user-supplied input as a key in a Marten <code>Dictionary&lt;,&gt;</code> indexer within a LINQ <code>Where</code> filter.</li>
<li>Attacker crafts a payload containing a single quote character designed to terminate the SQL string literal and append malicious SQL logic.</li>
<li>The Marten LINQ provider receives the payload and interpolates the string into the generated SQL query without parameterization or escaping.</li>
<li>The query is transmitted to the PostgreSQL database, where the injected SQL fragment executes with the privileges of the application's database user.</li>
<li>The injection modifies the query logic, such as appending <code>or 1=1 --</code>, effectively bypassing intended filter conditions or tenant isolation boundaries.</li>
<li>The database returns unauthorized records from other tenants or reveals sensitive data through blind SQL injection techniques.</li>
<li>If multi-statement support is enabled, the attacker injects a second statement (e.g., <code>'; DROP TABLE... --</code>) to perform data modification or destructive actions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation leads to a total compromise of data confidentiality within the affected PostgreSQL database. Attackers can bypass multi-tenancy controls to access data across different partitions, perform blind exfiltration of sensitive information, or potentially execute data modification/deletion attacks. The vulnerability affects a wide range of Marten versions (v7.0.0 through v9.12.0), posing a critical risk to any application relying on these library functions for dynamic filtering or multi-tenant management.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Upgrade Marten to a patched version immediately.</li>
<li>If an immediate upgrade is not possible, identify and sanitize all instances where user-controlled input is passed as a key to dictionary indexers (<code>Where</code> filters) or arguments to <code>Dictionary.ContainsKey</code>.</li>
<li>Restrict the use of user-supplied input in <code>Select</code> projection constants or tenant ID arguments within projection teardown functions.</li>
<li>Disable support for multi-statement command batching in the Npgsql connection string to limit the impact of potential SQL injection payloads.</li>
<li>Implement strict input validation and allow-listing for any string intended to be used as a dictionary key or tenant identifier in the data access layer.</li>
</ol>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>marten</category><category>sql-injection</category><category>cve-2026-75513</category><category>dotnet</category><category>database-security</category></item></channel></rss>