CVE-2026-75513

CVE-2026-75513 is a critical-severity SQL injection vulnerability in Marten (nuget), affecting versions >= 7.0.0, <= 9.12.0. It is fixed in 9.13.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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;

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.

Impact

Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.

CVE-2026-75513 has a CVSS score of 9.1 (Critical). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (9.13.0); upgrading removes the vulnerable code path.

Affected versions

Marten (>= 7.0.0, <= 9.12.0)

Security releases

Marten → 9.13.0 (nuget)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-75513? CVE-2026-75513 is a critical-severity SQL injection vulnerability in Marten (nuget), affecting versions >= 7.0.0, <= 9.12.0. It is fixed in 9.13.0. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
  2. How severe is CVE-2026-75513? CVE-2026-75513 has a CVSS score of 9.1 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of Marten are affected by CVE-2026-75513? Marten (nuget) versions >= 7.0.0, <= 9.12.0 is affected.
  4. Is there a fix for CVE-2026-75513? Yes. CVE-2026-75513 is fixed in 9.13.0. Upgrade to this version or later.
  5. Is CVE-2026-75513 exploitable, and should I be worried? Whether CVE-2026-75513 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-75513 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-75513? Upgrade Marten to 9.13.0 or later.

Stop the waste.
Protect your environment with Kodem.