Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Marten-backed app
-
DeliverySubmit crafted dictionary key with single quote
-
ExploitBreak out of SQL literal, inject always-true predicate
-
ExecutionBypass filter and tenant isolation
-
ImpactExfiltrate cross-tenant data (blind)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the host application to pass attacker-controlled strings into one of the affected Marten paths: the primary confirmed vector is a dictionary indexer key used in Where filters (DictionaryItemMember.cs); Dictionary.ContainsKey is exploitable ONLY when the Newtonsoft serializer is configured (System.Text.Json is not affected); and tenant identifiers reaching DeleteAllForTenant.cs via IEventStore.DeleteProjectionProgressAsync. Limiting factors: the vulnerable strings must be reachable from untrusted input (a library/application-integration prerequisite), the CVSS PR:L implies an authenticated context, and DATA MODIFICATION (beyond read/authorization bypass) is possible only on deployments that permit semicolon-batched Npgsql statements - a non-default multi-statement configuration. Read-based filter/multi-tenant authorization bypass and blind exfiltration do not require the batched-statement setting. |
| Impact | This is a genuine high-priority SQL injection (CWE-89) in Marten, confirmed by the vendor's own GitHub Security Advisory (GHSA-rfx3-98h7-v3xp) and fixed in 9.13.0 via PR #4911 with dedicated regression tests. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L, 9.1) signals a network-reachable, low-complexity flaw whose scope-change (S:C) reflects cross-tenant authorization bypass - an attacker reading data belonging to other tenants, which is the most serious real-world consequence. Confidentiality is High while Integrity/Availability are Low because write/delete impact is conditional (only where semicolon-batched Npgsql statements are permitted, a non-default connection setting). No EPSS score, no CISA KEV listing, and no standalone public exploit were provided, so there is no evidence of active exploitation; however, the PR #4911 regression tests embed working attack payloads (e.g. "nonexistent' = '' or 1=1 --", "x' or '1'='1"), which materially lowers the barrier to weaponization. The one caveat is the PR:L rating: exploitability depends entirely on whether the host application routes attacker-controlled input into the affected LINQ dictionary-indexer/ContainsKey or tenant-management paths - a library-context prerequisite the CVSS vector cannot fully capture. Overall: a real priority for any multi-tenant Marten deployment, not an inflated-CVSS non-issue. |
| Exploit ScenarioDerived | An application uses Marten LINQ with a dictionary field and passes a user-supplied value as the dictionary indexer/ContainsKey key (e.g. filtering documents by an attribute the user selects). The attacker submits a key containing a single quote such as "nonexistent' = '' or 1=1 --", breaking out of the generated single-quoted JSON-path literal to inject an always-true predicate that bypasses the filter and any per-tenant restriction, enabling blind exfiltration of other tenants' documents. No public standalone exploit is listed, but the vendor's fix PR contains proof-of-concept attack strings. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 16, 2026
SQL injection (CWE-89) in Marten, the .NET transactional document DB and event store for PostgreSQL, affects versions 7.0.0 through 9.12.x and lets an authenticated attacker who can influence strings reaching Marten's LINQ or tenant-management paths break out of single-quoted SQL/JSON-path literals and inject an always-true predicate, causing filter or multi-tenant authorization bypass and blind data exfiltration; on deployments that permit semicolon-batched Npgsql statements, data modification is also possible. The primary confirmed vector is a dictionary indexer key used in Where filters (src/Marten/Linq/Members/Dictionaries/DictionaryItemMember.cs); Dictionary.ContainsKey is exploitable only under the Newtonsoft serializer, tenant identifiers reaching DeleteAllForTenant.cs via IEventStore.DeleteProjectionProgressAsync are likewise affected, and EventLoader.cs contains a related defense-in-depth sink. The vendor confirmed the issue in GHSA-rfx3-98h7-v3xp and fixed it in version 9.13.0 via PR #4911; no public exploit code was identified at time of analysis, and exploitation requires the host application to route attacker-controlled strings into one of these Marten paths.
RemediationAI
Vendor-released patch: upgrade Marten to 9.13.0 (https://github.com/JasperFx/marten/releases/tag/9.13.0), which contains PR #4911 (commit 61882d0424854cb48703f08bdb246894ac576bed) parameterizing the tenant identifier and escaping single quotes in the affected JSON-path literals; no backport to 7.x/8.x is referenced in the available data, so plan an upgrade to the 9.13.0 line. If immediate upgrade is not possible, apply targeted compensating controls: audit every call site that places a user-supplied string into a Where dictionary indexer or ContainsKey call and reject or strip single quotes and JSON-path metacharacters before the value reaches Marten (trade-off: legitimate dictionary keys containing apostrophes will no longer match and may need a canonicalized storage format); switch to the System.Text.Json serializer so the ContainsKey sink is not reachable under Newtonsoft (trade-off: serializer behavior differences may change persisted document shape, so test migration paths); enforce identifier validation on every tenant id before it reaches IEventStore.DeleteProjectionProgressAsync/TeardownForTenant, matching the AssertValidPostgresqlIdentifiers rules that the teardown path bypasses (trade-off: tenant ids that do not conform must be remapped, and any id-validation bypass elsewhere reopens the sink); disable semicolon-batched, multi-statement Npgsql configuration so the data-modification branch is unreachable (trade-off: multi-statement command support must be replaced by individual statements); and run the Marten connection role with minimal privileges, denying broad DELETE/UPDATE on tenant document tables (trade-off: legitimate teardown and bulk-maintenance operations may require a separate, more privileged role). Regression tests added upstream confirm the injection is neutralized, and the advisory at https://github.com/JasperFx/marten/security/advisories/GHSA-rfx3-98h7-v3xp should be tracked for any further guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in nuget
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Marten generates PostgreSQL SQL from .NET LINQ expressions and from internal tenant-management operations, and several of those code paths historically concatenated runtime strings into single-quoted literals rather than binding them as parameters. The core root cause is CWE-89 (improper neutralization of special elements used in SQL commands): in DictionaryItemMember.cs, a dictionary indexer key used inside a Where filter is emitted into a JSON-path style literal such as '{...}' - for example a Where(x => x.Attributes[key] == "v") predicate - so a key containing a single quote terminates the literal early and lets an attacker append arbitrary predicate text, which is why the CVSS vector shows scope change (S:C) and high confidentiality impact while integrity/availability stay limited. DictionaryContainsKeyFilter.cs has the same weakness, but only when the Newtonsoft serializer is configured, because Newtonsoft's ToCleanJson output leaves a single quote unescaped whereas System.Text.Json does not. DatabaseScopedTenantPartitions.cs, DeleteAllForTenant.cs (reached through IEventStore.DeleteProjectionProgressAsync -> TeardownForTenant, where the tenant id is not guaranteed to have passed AssertValidPostgresqlIdentifiers) and EventLoader.cs' per-tenant partition-pruning literal round out the sink list, with EventLoader.cs flagged by the advisory as defense in depth. The fix in PR #4911/commit 61882d0424854cb48703f08bdb246894ac576bed converts the tenant id into a bound parameter (the regression test asserts the malicious value travels as cmd.Parameters[0] and never appears inline) and escapes embedded single quotes in the JSON-path literals, so the attacker-controlled value remains data instead of becoming SQL syntax.
Know when Marten gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L
Network-reachable, low-complexity injection needing app-level authenticated input (PR:L); S:C for cross-tenant boundary crossing; C:H exfiltration, I:L/A:L since write/delete is gated on non-default batched statements.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Marten is a .NET Transactional Document DB and Event Store on PostgreSQL. From version 7.0.0 until 9.13.0, several Marten LINQ and tenant-management paths interpolate runtime, potentially attacker-controlled strings into single-quoted SQL literals without escaping or parameterization. The primary confirmed vector is a dictionary indexer key used by Where filters in src/Marten/Linq/Members/Dictionaries/DictionaryItemMember.cs. Additional affected sinks include SelectParser.cs, DatabaseScopedTenantPartitions.cs, and DeleteAllForTenant.cs reached through IEventStore.DeleteProjectionProgressAsync, while DictionaryContainsKeyFilter.cs (Newtonsoft serializer only; System.Text.Json is not affected) handles ContainsKey calls. Events/Daemon/Internals/EventLoader.cs contains a related per-tenant partition-pruning literal that the advisory identifies as a defense-in-depth sink. A crafted single quote can escape the generated literal, enabling filter or multi-tenant authorization bypass and blind data exfiltration, and deployments that permit semicolon-batched Npgsql statements may also allow data modification. This issue is fixed in version 9.13.0.
Articles & Coverage 1
Technical POC Analysis
CWE-89 SQL injection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Marten, the .NET transactional document database and event store for PostgreSQL, contains a critical SQL injection vulnerability (CVE-2026-75513) affecting versions 7.0.0 through 9.12.x that enables multi-tenant authorization bypass and blind data exfiltration. Organizations using Marten to isolate tenant data could suffer cross-tenant data leakage and, where specific database configurations exist, unauthorized data modification, undermining customer trust and regulatory compliance. Leadership should prioritize immediate remediation because the flaw directly threatens the confidentiality and integrity of multi-tenant applications built on this platform.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
EUVD-2026-81263
GHSA-rfx3-98h7-v3xp
NVD
CVE.org
EPSS
Exploit-DB