Marten Full-Text Search SQL Injection Vulnerability (CVE-2026-45288)
Marten versions up to 8.36 are vulnerable to SQL injection due to the `regConfig` parameter in full-text search APIs not being properly validated or parameterized, allowing attackers to inject arbitrary SQL commands by manipulating the `regConfig` parameter, potentially leading to information disclosure, data manipulation, or denial-of-service; version 8.36.1 addresses this vulnerability.
Marten, a .NET transactional document database and event store, contains a SQL injection vulnerability (CVE-2026-45288) in versions 8.36 and earlier. The vulnerability stems from the improper handling of the regConfig parameter within its full-text search APIs. Specifically, the regConfig parameter, intended to specify the text search configuration, is directly interpolated into SQL queries without sufficient validation or parameterization. This allows an attacker to inject arbitrary SQL commands by crafting a malicious regConfig value. Successful exploitation can lead to unauthorized data access, modification, or denial-of-service. The vulnerability was privately reported and patched in version 8.36.1 by introducing regular expression validation of the regConfig parameter.
Attack Chain
- The attacker identifies an application using a vulnerable version of Marten (<= 8.36) with exposed
regConfigparameter. - The attacker crafts a malicious
regConfigvalue containing SQL injection payloads (e.g.,english'; SELECT version(); --). - The attacker injects the malicious
regConfigvalue into one of the vulnerable API endpoints likeIQuerySession.SearchAsync<T>(string searchTerm, string regConfig, ...)via a request parameter (e.g.?lang=). - The Marten application receives the request and incorporates the malicious
regConfigvalue into the generated SQL query. - The database executes the attacker-injected SQL commands. This could involve selecting data, dropping tables, or causing delays using
pg_sleep. - The attacker observes the effects of the injected SQL, such as information disclosure through error messages or timing differences, or direct extraction if query results are surfaced.
- The attacker escalates the attack based on the initial success, potentially gaining full control over the database contents or disrupting service availability.
Impact
Successful exploitation of this SQL injection vulnerability (CVE-2026-45288) can have severe consequences. An attacker could gain unauthorized access to sensitive data, leading to confidentiality breaches. Data integrity is also at risk, as attackers can modify or delete data. Furthermore, attackers can cause denial-of-service by injecting commands that consume excessive resources or disrupt database operations. The specific impact depends on the privileges of the database user used by the Marten application.
Recommendation
- Upgrade Marten to version 8.36.1 or later to remediate the vulnerability. The patch introduces validation on the
regConfigparameter (JasperFx/marten#4343). - If upgrading is not immediately feasible, implement one of the suggested workarounds, such as hardcoding
regConfigor validating user-supplied input against a safe regex. - Monitor web server logs for requests containing potentially malicious SQL injection attempts in the
regConfigparameter. Deploy the Sigma rule to detect SQL injection attempts in HTTP requests targeting Marten applications. - Implement input validation on the application layer to sanitize user input before passing it to Marten, specifically for the
regConfigparameter.
Detection coverage 2
Detects CVE-2026-45288 Exploitation — Marten SQL Injection via regConfig
highDetects CVE-2026-45288 exploitation — SQL injection attempts in HTTP requests targeting Marten applications by looking for shell metacharacters or SQL keywords in the regConfig parameter.
Detects CVE-2026-45288 Exploitation — Marten regConfig Validation Bypass Attempt
highDetects CVE-2026-45288 exploitation — detects attempts to bypass the intended regConfig validation by using schema-qualified names with injection attempts.
Detection queries are available on the platform. Get full rules →