GHSA-vmw2-qwm8-x84c

Suggest an improvement
Source
https://github.com/advisories/GHSA-vmw2-qwm8-x84c
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-vmw2-qwm8-x84c/GHSA-vmw2-qwm8-x84c.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vmw2-qwm8-x84c
Aliases
  • CVE-2026-45288
Published
2026-05-14T20:46:26Z
Modified
2026-05-14T21:05:57.406210Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Marten has an injection vulnerability in its full-text search regConfig parameter
Details

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:

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 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.

Database specific
{
    "severity": "CRITICAL",
    "cwe_ids": [
        "CWE-74",
        "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-14T20:46:26Z",
    "nvd_published_at": null
}
References

Affected packages

NuGet / Marten

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
8.37.0

Affected versions

0.*
0.5.0.8
0.5.0.9
0.5.1.34
0.5.2.36
0.5.3.38
0.6.0.43
0.6.1.46
0.6.2.57
0.6.3.67
0.6.4.77
0.6.5.78
0.6.6.82
0.7.0.85
0.7.0.97
0.7.1.103
0.8.0.132
0.8.2.188
0.8.3.238
0.8.4.255
0.8.5.274
0.8.6.284
0.8.7.297
0.8.8.299
0.8.9.322
0.8.10.355
0.9.0.379
0.9.1.401
0.9.2.423
0.9.2.427
0.9.3.458
0.9.4.464
0.9.5.473
0.9.6.493
0.9.6.498
0.9.7.515
0.9.7.517
0.9.8.523
0.9.9.534
0.9.9.551
0.9.10.555
0.9.11.556
0.9.12.563
1.*
1.0.0-alpha-625
1.0.0-alpha-639
1.0.0-alpha-644
1.0.0-alpha-663
1.0.0-alpha-664
1.0.0-alpha-666
1.0.0-alpha-667
1.0.0-alpha-668
1.0.0-alpha-669
1.0.0-alpha-701
1.0.0-alpha-703
1.0.0-alpha-706
1.0.0-alpha-709
1.0.0-alpha-710
1.0.0-alpha-719
1.0.0
1.0.1
1.0.2
1.0.3
1.1.0
1.1.1
1.1.2
1.1.3
1.2.0
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
1.3.0
1.4.0
1.4.1
1.5.0
1.5.1
1.5.2
1.5.3
2.*
2.0.0-alpha-50651
2.0.0-alpha-51133
2.0.0-alpha-51614
2.0.0-rc-50930
2.0.0-rc-51247
2.0.0
2.1.0
2.2.0
2.3.0
2.3.1
2.3.2
2.4.0
2.5.0
2.6.0
2.7.0
2.7.1
2.8.0
2.8.1
2.8.2
2.9.0
2.10.0
2.10.1
2.10.2
2.10.3
3.*
3.0.0-alpha-1
3.0.0-alpha-2
3.0.0
3.0.1
3.1.0
3.2.0
3.3.0
3.4.0
3.5.0
3.6.0
3.6.1
3.6.2
3.7.0
3.7.1
3.8.0
3.8.1
3.9.0
3.10.0
3.11.0
3.12.0
3.12.1
3.12.2
3.12.3
3.12.4
3.13.0
3.13.1
3.13.2
3.13.3
3.13.4
3.13.5
3.14.0
3.14.1
3.14.2
3.14.3
3.14.4
4.*
4.0.0-alpha
4.0.0
4.0.1
4.0.2
4.0.3
4.0.4
4.1.0
4.2.0
4.3.0
4.3.1
5.*
5.0.0
5.1.0
5.2.0
5.3.0
5.3.1
5.4.0
5.5.0
5.5.1
5.5.2
5.6.0
5.7.0
5.8.0
5.9.0
5.10.0
5.10.1
5.11.0
6.*
6.0.3
6.0.4
6.0.5
6.1.0
6.2.0
6.3.0
6.4.0
6.4.1
6.4.2
7.*
7.0.0
7.1.0
7.1.1
7.2.0
7.3.0
7.3.1
7.4.0
7.5.0
7.6.0
7.7.0
7.8.0
7.9.0
7.10.0
7.10.1
7.11.0
7.12.0
7.13.0
7.13.1
7.14.0
7.15.0
7.16.0
7.17.0
7.17.1
7.18.0
7.19.0
7.19.1
7.20.0
7.20.1
7.20.2
7.21.0
7.21.1
7.22.0
7.23.0
7.23.1
7.24.0
7.25.0
7.25.1
7.25.2
7.26.0
7.26.1
7.26.2
7.26.3
7.26.4
7.26.5
7.26.6
7.27.0
7.28.0
7.28.1
7.28.2
7.29.0
7.30.0
7.30.1
7.30.2
7.30.3
7.31.0
7.31.1
7.31.2
7.31.3
7.32.0
7.33.0
7.33.1
7.33.2
7.33.3
7.34.0
7.34.1
7.35.0
7.35.1
7.35.2
7.35.3
7.36.0
7.37.0
7.37.1
7.37.2
7.37.3
7.38.0
7.38.1
7.39.0
7.39.1
7.39.2
7.39.3
7.39.5
7.39.6
7.40.0
7.40.1
7.40.2
7.40.3
7.40.4
7.40.5
8.*
8.0.0-alpha-2
8.0.0-alpha-3
8.0.0-alpha-5
8.0.0-alpha-6-
8.0.0-beta-1
8.0.0-beta-2
8.0.0-rc-1
8.0.0-rc-2
8.0.0
8.0.1
8.1.0
8.1.2
8.2.0
8.2.1
8.3.0
8.3.1
8.3.2
8.3.3
8.4.0
8.5.0
8.6.0
8.7.0
8.8.0
8.8.1
8.8.2
8.9.0-channels-alpha-1
8.9.0-channels-alpha-2
8.9.0
8.10.0
8.10.1
8.11.0
8.12.0
8.13.0
8.13.1
8.13.2
8.13.3
8.14.0
8.15.0
8.15.1
8.15.2
8.15.3
8.15.4
8.16.0
8.16.1
8.16.2
8.16.3
8.16.4
8.17.0
8.18.0
8.18.1
8.18.2
8.18.3
8.19.0
8.20.0
8.21.0
8.22.0
8.22.1
8.22.2
8.23.0
8.24.0
8.25.0
8.26.0
8.26.1
8.26.2
8.27.0
8.28.0
8.29.0
8.29.1
8.29.2
8.29.3
8.30.0
8.30.1
8.31.0
8.32.0
8.32.1
8.33.0
8.34.0
8.34.1
8.34.2
8.35.0
8.36.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-vmw2-qwm8-x84c/GHSA-vmw2-qwm8-x84c.json"
last_known_affected_version_range
"<= 8.36"