Skip to main content

Marten CVE-2026-45288

| EUVDEUVD-2026-33022 CRITICAL
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-05-14 https://github.com/JasperFx/marten GHSA-vmw2-qwm8-x84c
9.8
CVSS 3.1 · Vendor: https://github.com/JasperFx/marten
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Access public search endpoint
  2. Delivery
    Inject crafted regConfig payload
  3. Exploit
    Trigger SQL generation in FullTextWhereFragment
  4. Execution
    Execute arbitrary PostgreSQL commands
  5. Persist
    Exfiltrate data or modify schema
  6. Impact
    Establish persistence via DDL

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

The calling application must accept attacker-controlled input and pass it directly to the regConfig parameter of one of Marten's five full-text search methods (SearchAsync, PlainTextSearchAsync, PhraseSearchAsync, WebStyleSearchAsync, PrefixSearchAsync). This typically occurs when developers expose language-selection features via HTTP query parameters, form fields, or API request bodies that map to regConfig without intermediate validation-for example, a multi-language search portal allowing users to specify 'english', 'french', or 'spanish' as a ?lang= parameter. The vulnerability requires that the application's Marten code path reaches a full-text search API call with the tainted regConfig value, which then generates and executes SQL against PostgreSQL. Limiting factors: Applications that hard-code regConfig to compile-time constants ('english', 'simple', etc.) are explicitly NOT vulnerable per the vendor advisory. Additionally, while the CVSS vector indicates no authentication required (PR:N), practical exploitation depends on whether the vulnerable search endpoint itself requires authentication-many production search APIs are public-facing, but some may be protected behind login requirements, reducing real-world attack surface. The PostgreSQL database role's privileges further limit impact: restrictive roles (SELECT-only, limited to specific schemas) constrain DDL and exfiltration vectors, while elevated roles (superuser, table owner) enable full database compromise. No user interaction required (UI:N) once attacker reaches the endpoint, and attack complexity is low (AC:L)-a single malicious parameter value suffices.

Impact

CVSS 9.8 (Critical) indicates maximum exploitability: network-accessible (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), with full confidentiality/integrity/availability impact (C:H/I:H/A:H). However, real-world risk depends entirely on whether applications expose the regConfig parameter to external input. The advisory explicitly states the precondition: 'the calling application must forward attacker-controlled input into the regConfig parameter (e.g. a ?lang= query string mapped to regConfig). Applications that hard-code regConfig to a compile-time constant are not exploitable.' This significantly limits the attack surface compared to the CVSS score alone. No EPSS data provided, no CISA KEV listing, but the vendor advisory includes working POC code for all five attack vectors (time-based blind, information disclosure, DDL execution), lowering the skill threshold for exploitation. The vulnerability is trivially exploitable where the precondition is met (single quote in regConfig breaks out of SQL literal context), but the precondition itself may be uncommon in production deployments since text-search language configurations are typically environment constants rather than user-selectable parameters. Security teams should audit regConfig call sites: high urgency if any accept request parameters, low urgency if all are hard-coded constants.

Exploit ScenarioDerived

An ASP.NET Core application using Marten exposes a search endpoint where users can specify the text-search language configuration via a ?lang= query parameter, mapping it directly to the regConfig parameter: searchSession.SearchAsync<Article>(query, Request.Query["lang"]). An attacker sends a crafted request with lang=english'; DROP TABLE mt_doc_article; --, causing Marten's FullTextWhereFragment to interpolate this payload into the WHERE clause SQL. The single quote terminates the regconfig literal, the semicolon ends the statement, and DROP TABLE executes under the application's database role permissions. If the connection string uses a privileged role, the attacker can delete tables, exfiltrate data via SELECT version(), or establish persistence through DDL modifications. The advisory confirms working POC payloads for time-based blind extraction (pg_sleep(5)) and information disclosure (SELECT version()), demonstrating the vulnerability is immediately weaponizable against applications meeting the precondition.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 14, 2026

SQL injection in Marten's PostgreSQL full-text search APIs allows remote unauthenticated attackers to execute arbitrary database commands when applications pass user-controlled input to the regConfig parameter. The vulnerability affects all five search method overloads (SearchAsync, PlainTextSearchAsync, PhraseSearchAsync, WebStyleSearchAsync, PrefixSearchAsync) where the regConfig parameter is interpolated directly into SQL without validation. Confirmed exploit payloads demonstrate time-based blind extraction, information disclosure via SELECT statements, and DDL execution including table drops. Vendor-released patch available in Marten 8.37.0 via GitHub PR #4343. No public exploit identified at time of analysis, though the advisory includes working proof-of-concept payloads for all affected methods.

RemediationAI

Upgrade to Marten 8.37.0 or later, which implements regex-based validation of the regConfig parameter via PR #4343 (https://github.com/JasperFx/marten/pull/4343, commit 626249656829860b9c55895b5b6046b61a2a695f). The patch rejects any regConfig value not matching ^[a-zA-Z_][a-zA-Z0-9_]*(\.\[a-zA-Z_][a-zA-Z0-9_]*)?$ and throws ArgumentException, allowing only simple or schema-qualified PostgreSQL identifiers while preserving support for standard configurations like 'english', 'simple', or 'pg_catalog.english'. If immediate upgrade is not feasible, apply one of these workarounds at the application boundary: (1) Hard-code regConfig to a compile-time constant ('english', 'simple', etc.) and never accept it from HTTP requests, query strings, or other external sources. (2) Validate externally-sourced regConfig values against the same regex pattern or a strict allowlist of known-safe PostgreSQL text-search configurations before passing to Marten APIs. (3) Remove the regConfig argument from call sites entirely, allowing Marten to use its safe default value. The workarounds prevent exploitation but limit runtime flexibility; option 2 preserves legitimate multi-language support with minimal security trade-off. Note that the advisory warns against partial mitigations like escaping single quotes-proper validation or upgrade is required.

Affected VersionsENISA

marten < 8.36.1

Affected Packages

nuget marten fix: 8.36.1, 8.37.0

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 is a .NET document database library for PostgreSQL, treating the database as both a document store and queryable database. The vulnerability resides in the FullTextWhereFragment class which generates SQL WHERE clauses for PostgreSQL full-text search operations using the to_tsvector and regconfig type-casting. The affected code uses C

string interpolation ($"to_tsvector('{_regConfig}'::regconfig...") rather than parameterized queries, violating CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component). PostgreSQL's regconfig type accepts configuration names stored as identifiers in pg_ts_config, which should be validated against NAMEDATALEN constraints. The NuGet package identifier is pkg:nuget/marten, affecting all versions ≤ 8.36. The fix introduces regex validation (^[a-zA-Z_][a-zA-Z0-9_]*(\.\[a-zA-Z_][a-zA-Z0-9_]*)?$) limiting regConfig to simple or schema-qualified PostgreSQL identifiers, preventing single-quote injection.

Know when PostgreSQL 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

Vendor (https://github.com/JasperFx/marten) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from Vendor (https://github.com/JasperFx/marten) · only source for this CVE.

CVSS VectorVendor: https://github.com/JasperFx/marten

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

DescriptionCVE.org

Summary

Marten's full-text search APIs interpolated the user-supplied regConfig parameter directly into the generated SQL without parameterization or validation, making every code path that exposes regConfig to untrusted input a SQL injection sink.

Affected APIs

  • IQuerySession.SearchAsync<T>(string searchTerm, string regConfig, ...)
  • IQuerySession.PlainTextSearchAsync<T>(...)
  • IQuerySession.PhraseSearchAsync<T>(...)
  • IQuerySession.WebStyleSearchAsync<T>(...)
  • IQuerySession.PrefixSearchAsync<T>(...)
  • IQueryable<T>.Where(x => x.Search(term, regConfig)) and the matching PlainTextSearch / PhraseSearch / WebStyleSearch / PrefixSearch extension methods

Details

In the affected versions, FullTextWhereFragment renders the WHERE-clause SQL by string interpolation:

csharp
private string Sql =>
    $"to_tsvector('{_regConfig}'::regconfig, {_dataConfig}) @@ {_searchFunction}('{_regConfig}'::regconfig, ?)";

_regConfig arrives unchanged from the public API surface above. Any value containing a single quote terminates the SQL literal and lets an attacker append arbitrary PostgreSQL.

Confirmed exploit shapes (with regConfig set to attacker-controlled input)

GoalPayload
Time-based blindenglish'::text); SELECT pg_sleep(5); --
Information disclosureenglish'; SELECT version(); --
DDL executionenglish'; DROP TABLE mt_doc_article; --

All five overloads listed above produced SQL containing the verbatim payload.

Impact

  • Confidentiality: an attacker can append arbitrary SELECT statements and exfiltrate database contents through error channels, response timing, or - if the application surfaces query results - directly.
  • Integrity / Availability: DDL, UPDATE, DELETE, and pg_sleep-style denial-of-service payloads succeed under the same vector. Concrete impact depends on the database role used by the Marten connection string.
  • Precondition: the calling application must forward attacker-controlled input into the regConfig parameter (e.g. a ?lang= query string mapped to regConfig). Applications that hard-code regConfig to a compile-time constant are not exploitable.

Patches

Fixed in Marten 8.36.1 (and forward) by #4343.

FullTextWhereFragment now validates regConfig against ^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)?$ (a simple PostgreSQL identifier, optionally schema-qualified, capped at NAMEDATALEN-1 per side) and throws ArgumentException for anything else. The default value ("english"), schema-qualified configs ("pg_catalog.english"), and the standard PostgreSQL text-search configurations all continue to work.

Workarounds

If users cannot upgrade immediately, do one of the following at the application boundary:

  1. Hard-code regConfig to a compile-time constant ("english", "simple", …) and never accept it from request input.
  2. Validate any externally-sourced regConfig value before passing it to Marten - e.g. against the same regex as the patch (^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)?$) or against an allowlist of PostgreSQL configurations the application actually uses.
  3. Drop the regConfig argument from the call site so Marten falls back to the safe default.

Resources

Credit

Reported privately to the JasperFx team with a working proof of concept covering all five affected overloads.

Executive ViewAI

Why It Matters

Marten's PostgreSQL full-text search APIs contain a critical SQL injection vulnerability (CVE-2026-45288, CVSS 9.8) that allows unauthenticated attackers to execute arbitrary database commands through unsanitized user input in search parameters. Any application using Marten's SearchAsync, PlainTextSearchAsync, PhraseSearchAsync, WebStyleSearchAsync, or PrefixSearchAsync methods with untrusted input is at immediate risk of data exfiltration, modification, or destruction without requiring authentication. Immediate patching is essential to prevent database compromise.

Business Impact: Severe
Compensating Controls

Apply vendor patch (Marten 8.37.0 or later). If immediate patching is not feasible, implement network-level controls restricting database access to only trusted application servers and disable or restrict all user-accessible full-text search functionality pending patch deployment.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy