Skip to main content

CVE-2026-75513 — Vulnerability in Marten — CVE Details

CRITICAL

Marten's LINQ provider has SQL injection via unescaped string literals

Published September 17, 2026Updated November 9, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.47%). Schedule for your next planned update.

Does your project use an affected Marten version?

Paste your packages.lock.json to check it for CVE-2026-75513 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my packages.lock.json

Summary

Several code paths in Marten's LINQ provider and tenant-management internals interpolated a runtime, potentially attacker-influenced value into generated SQL as a single-quoted string literal without escaping or parameterization. A value containing a single quote (') could break out of the literal and inject arbitrary SQL.

The primary vector is a Dictionary<,> indexer key used in a Where filter — Where(x => x.Attributes[key] == v) — a common "filter by attribute name" / EAV pattern. It is confirmed with an executed proof-of-concept and yields filter / multi-tenant authorization bypass (returning other tenants' rows) and blind data exfiltration. Where the application permits ;-batched statements (Npgsql default), data modification is also possible.

Affected sinks

  • Linq/Members/Dictionaries/DictionaryItemMember.cs — dictionary indexer key (primary, confirmed PoC)
  • Linq/Members/Dictionaries/DictionaryContainsKeyFilter.cs — Dictionary.ContainsKey(key) (Newtonsoft serializer only; System.Text.Json escapes the quote)
  • Linq/Parsing/SelectParser.cs — a constant string projected through Select(x => new { L = runtimeString })
  • Internal/Operations/DeleteAllForTenant.cs — tenant id reaching per-tenant projection teardown via IEventStore.DeleteProjectionProgressAsync (an in-code comment wrongly claimed the value was validated)
  • Schema/DatabaseScopedTenantPartitions.cs — tenant id inlined into FOR VALUES IN ('...') partition DDL
  • Events/Daemon/Internals/EventLoader.cs (defense-in-depth) — per-tenant partition-pruning literal

Proof of concept (primary vector)

Benign: x.Attributes["nonexistent-key"] == "v" returns 0 rows. Attack: x.Attributes["nonexistent' = '' or 1=1 --"] == "v" returns all rows. Generated SQL:

select d.data from public.mt_doc_doc as d where d.data -> 'Attributes' ->> 'x' or 1=1 --' = :p0;

Fix

Each sink now escapes embedded single quotes (.Replace("'", "''"), mirroring the existing Ordering.BuildNgramRankExpression) or binds the value as a parameter (DeleteAllForTenant). Where a literal is retained for partition pruning, escaping preserves plan-time pruning while closing the injection. Regression tests lock down each vector.

Workarounds

Until upgrading: do not pass untrusted input as a dictionary indexer key / ContainsKey argument / Select constant, nor as a tenant id into projection teardown or provisioning; and disable multi-statement command batching to limit blast radius.

Credit

Reported privately and responsibly by an external security researcher with an executed PoC. Additional sinks found during the follow-up LINQ-wide audit.

Advisory Timeline

  • First published September 17, 2026 (70 days ago).
  • Last revised November 9, 2026 — 53 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Marten to 9.13.0 or later
dotnet add package Marten --version 9.13.0
NuGet
Update Marten to 8.37.4 or later
dotnet add package Marten --version 8.37.4

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: NuGet (1).

PackageFixed In
Marten NuGet · Affected: 9.0.0, 9.0.1, 9.0.2, 9.10.0 (+27 more)9.13.0
Marten NuGet · Affected: 7.0.0, 7.1.0, 7.1.1, 7.10.0 (+169 more)8.37.4

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L

Frequently Asked Questions

What is CVE-2026-75513?
Marten's LINQ provider has SQL injection via unescaped string literals. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2026-75513?
CVE-2026-75513 affects Marten. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-75513 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.47%
EPSS percentile: 32.6

This is a below-median EPSS score — only 32.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-rfx3-98h7-v3xp

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json