/

CVE-2026-115332

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in Lotus Subscription Filters

CVE-2026-115332

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database query manipulation and potential cross-tenant data exposure

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in Lotus allows authenticated organization users to influence usage aggregation queries through crafted subscription filter keys. If keyword-only validation is bypassed and the key is inserted as an unquoted SQL identifier, an attacker may alter queries against the shared multi-tenant database.

A SQL injection vulnerability in Lotus allows authenticated organization users to influence usage aggregation queries through crafted subscription filter keys. If keyword-only validation is bypassed and the key is inserted as an unquoted SQL identifier, an attacker may alter queries against the shared multi-tenant database.

Affected context

The issue affects Lotus deployments that allow authenticated organization users to create subscriptions and register subscription_filter_keys. It becomes risky when those keys can bypass validation and are later rendered directly as unquoted GROUP BY identifiers in usage aggregation queries against a shared database.

The issue affects Lotus deployments that allow authenticated organization users to create subscriptions and register subscription_filter_keys. It becomes risky when those keys can bypass validation and are later rendered directly as unquoted GROUP BY identifiers in usage aggregation queries against a shared database.

Exploit preconditions

  • Attack surface: Subscription creation and usage aggregation query construction
  • Required access: An authenticated organization-level account permitted to create subscriptions
  • Trigger point: Processing a subscription containing a crafted subscription_filter_key
  • Why exploitation is possible: Validation does not adequately constrain the key, and the value is incorporated into SQL as an unquoted identifier rather than being safely mapped or parameterized
  • Attack surface: Subscription creation and usage aggregation query construction
  • Required access: An authenticated organization-level account permitted to create subscriptions
  • Trigger point: Processing a subscription containing a crafted subscription_filter_key
  • Why exploitation is possible: Validation does not adequately constrain the key, and the value is incorporated into SQL as an unquoted identifier rather than being safely mapped or parameterized

Why this happens

The underlying bug is insufficient validation and unsafe construction of SQL identifiers from user-controlled subscription data. Keyword-only validation does not establish that a value is a valid, intended identifier, while direct interpolation into a GROUP BY clause allows input to influence SQL syntax. This behavior maps to CWE-89, SQL Injection, because untrusted input reaches a database query without a sufficiently safe separation between data and query structure.

The underlying bug is insufficient validation and unsafe construction of SQL identifiers from user-controlled subscription data. Keyword-only validation does not establish that a value is a valid, intended identifier, while direct interpolation into a GROUP BY clause allows input to influence SQL syntax. This behavior maps to CWE-89, SQL Injection, because untrusted input reaches a database query without a sufficiently safe separation between data and query structure.

Potential impact

  • An attacker may alter usage aggregation queries.
  • Sensitive data from the shared database could be disclosed.
  • Cross-tenant information boundaries may be weakened.
  • Database contents could potentially be modified or deleted, depending on query privileges.
  • Database availability could be affected by resource-intensive or disruptive queries.
  • An attacker may alter usage aggregation queries.
  • Sensitive data from the shared database could be disclosed.
  • Cross-tenant information boundaries may be weakened.
  • Database contents could potentially be modified or deleted, depending on query privileges.
  • Database availability could be affected by resource-intensive or disruptive queries.

General mitigation guidance

Mitigation generally focuses on ensuring that user-controlled values cannot

define SQL structure.

Common defensive patterns include:

  • Mapping accepted filter keys to a fixed server-side allowlist of known column identifiers.
  • Using parameterized queries for values and safe identifier-quoting or query-builder APIs where dynamic identifiers are unavoidable.
  • Replacing keyword-only checks with strict schema validation, canonicalization, and rejection of unexpected characters or structures.
  • Applying least-privilege database roles that restrict modification and administrative operations.
  • Isolating tenant data and limiting query results according to an independently enforced authorization policy.
  • Avoiding disclosure of detailed database errors to organization users.

Mitigation generally focuses on ensuring that user-controlled values cannot

define SQL structure.

Common defensive patterns include:

  • Mapping accepted filter keys to a fixed server-side allowlist of known column identifiers.
  • Using parameterized queries for values and safe identifier-quoting or query-builder APIs where dynamic identifiers are unavoidable.
  • Replacing keyword-only checks with strict schema validation, canonicalization, and rejection of unexpected characters or structures.
  • Applying least-privilege database roles that restrict modification and administrative operations.
  • Isolating tenant data and limiting query results according to an independently enforced authorization policy.
  • Avoiding disclosure of detailed database errors to organization users.

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis rules for string interpolation, concatenation, or formatting of user input into SQL statements.
  • Code review checks for dynamic GROUP BY, ORDER BY, table, or column identifiers derived from request data.
  • Tests that verify allowlisted identifiers and reject unexpected syntax-bearing input.
  • Database activity monitoring for anomalous aggregation queries, unexpected statements, cross-tenant access patterns, and unusual query volume.
  • Policy enforcement requiring parameterized query APIs or approved query builders for application database access.
  • Neutral automated code-review and software-composition tools may help identify unsafe query construction patterns.

Detection approaches commonly include:

  • Static analysis rules for string interpolation, concatenation, or formatting of user input into SQL statements.
  • Code review checks for dynamic GROUP BY, ORDER BY, table, or column identifiers derived from request data.
  • Tests that verify allowlisted identifiers and reject unexpected syntax-bearing input.
  • Database activity monitoring for anomalous aggregation queries, unexpected statements, cross-tenant access patterns, and unusual query volume.
  • Policy enforcement requiring parameterized query APIs or approved query builders for application database access.
  • Neutral automated code-review and software-composition tools may help identify unsafe query construction patterns.

Sources

SourceLink
github.comgithub.com/uselotus/lotus
github.comgithub.com/uselotus/lotus/blob/0.10.2/backend/metering_billing/serializers/model_serializers.py#L518-L534
hackmd.iohackmd.io/@leediay/BkUc3WL2Mx
vulncheck.comvulncheck.com/advisories/lotus-through-0.10.2-sql-injection-via-subscription-filter-keys

Frequently asked

questions

It can be exploitable through the application interface by an authenticated

organization user who is allowed to create subscriptions. Exploitability

depends on the deployment's authorization rules and database permissions.

No. The described attack path requires an authenticated organization account

with subscription-creation privileges, although additional restrictions may

limit the resulting impact.

Do not let request data define SQL syntax. Use a strict server-side allowlist

for permitted identifiers, parameterize data values, and use a trusted

identifier-handling mechanism for any unavoidable dynamic SQL structure.

Combine schema-based input validation, centralized query-construction

utilities, least-privilege database roles, tenant-aware authorization checks,

and automated tests and review policies for dynamic SQL.

It can be exploitable through the application interface by an authenticated

organization user who is allowed to create subscriptions. Exploitability

depends on the deployment's authorization rules and database permissions.

No. The described attack path requires an authenticated organization account

with subscription-creation privileges, although additional restrictions may

limit the resulting impact.

Do not let request data define SQL syntax. Use a strict server-side allowlist

for permitted identifiers, parameterize data values, and use a trusted

identifier-handling mechanism for any unavoidable dynamic SQL structure.

Combine schema-based input validation, centralized query-construction

utilities, least-privilege database roles, tenant-aware authorization checks,

and automated tests and review policies for dynamic SQL.

Find out what's already
exploitable in your codebase.