JasperFx Marten
Marten: SQL injection in Marten's LINQ provider via unescaped string literals
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 7.0.0, < 9.13.0
Fixed in 9.13.0
Mitigation
Upgrade marten to 9.13.0 or later.
References
- Vendor advisory github.com/JasperFx/marten/security/advisories…
- Patch github.com/JasperFx/marten/pull/4911
- Patch github.com/JasperFx/marten/commit/61882d042485…
1 more
- Release notes github.com/JasperFx/marten/releases/tag/9.13.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.