Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAccess public search endpoint
-
DeliveryInject crafted regConfig payload
-
ExploitTrigger SQL generation in FullTextWhereFragment
-
ExecutionExecute arbitrary PostgreSQL commands
-
PersistExfiltrate data or modify schema
-
ImpactEstablish 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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 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
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
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 matchingPlainTextSearch/PhraseSearch/WebStyleSearch/PrefixSearchextension methods
Details
In the affected versions, FullTextWhereFragment renders the WHERE-clause SQL by string interpolation:
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)
| Goal | Payload |
|---|---|
| Time-based blind | english'::text); SELECT pg_sleep(5); -- |
| Information disclosure | english'; SELECT version(); -- |
| DDL execution | english'; DROP TABLE mt_doc_article; -- |
All five overloads listed above produced SQL containing the verbatim payload.
Impact
- Confidentiality: an attacker can append arbitrary
SELECTstatements and exfiltrate database contents through error channels, response timing, or - if the application surfaces query results - directly. - Integrity / Availability: DDL,
UPDATE,DELETE, andpg_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
regConfigparameter (e.g. a?lang=query string mapped toregConfig). Applications that hard-coderegConfigto 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:
- Hard-code
regConfigto a compile-time constant ("english","simple", …) and never accept it from request input. - Validate any externally-sourced
regConfigvalue 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. - Drop the
regConfigargument from the call site so Marten falls back to the safe default.
Resources
- Patch PR: JasperFx/marten#4343
- Patched file:
FullTextWhereFragment.cs - Regression tests:
full_text_regconfig_sql_injection.cs - CWE-89: <https://cwe.mitre.org/data/definitions/89.html>
Credit
Reported privately to the JasperFx team with a working proof of concept covering all five affected overloads.
Executive ViewAI
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.
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
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.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
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
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
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
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-33022
GHSA-vmw2-qwm8-x84c
NVD
CVE.org
EPSS
VulDB
Exploit-DB