Severity:

HIGH RISK

(7.3)

SQL Injection in Oinone Pamirs RSQLToSQLNodeConnector

CVE-2026-8734

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Modification via SQL Injection

Severity:

HIGH RISK

(7.3)

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

Oinone Pamirs up to 7.2.0 contains a SQL injection vulnerability in the RSQLToSQLNodeConnector.makeVariable function used by the queryListByWrapper interface.

Remote attackers who can influence query wrapper input may inject crafted values that alter the resulting SQL, potentially leading to data access, modification, or corruption.

Affected context

This vulnerability occurs in Oinone Pamirs deployments that expose the queryListByWrapper interface and pass user-controllable data into the RSQLToSQLNodeConnector.makeVariable function.

It becomes risky when request parameters, filter expressions, or other external inputs are translated into SQL fragments without strict validation, escaping, or parameterization.

The issue is more severe in environments where the application's database account has broad read/write privileges or access to sensitive business data.

Exploit preconditions

  • Attack surface: Remote, via the queryListByWrapper interface or any API/endpoint that internally uses RSQLToSQLNodeConnector.makeVariable.
  • Required access: Ability to send requests that influence query wrapper parameters (e.g., filters, search criteria, or dynamic query conditions).
  • Trigger point: Construction of SQL statements where the function interpolates or concatenates untrusted values into query text.
  • Why exploitation is possible: The implementation does not consistently use parameterized queries or robust escaping, allowing attacker-controlled values to break out of intended query structure and inject arbitrary SQL fragments.

Why this happens

The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

The RSQLToSQLNodeConnector.makeVariable function appears to transform RSQL or wrapper-based filter expressions into raw SQL segments by concatenating or formatting untrusted input directly into SQL strings.

Because this layer is responsible for bridging a query DSL/wrapper to concrete SQL, any lack of strict parameterization or sanitization turns expressive filter input into a vehicle for injecting control characters, operators, or additional clauses.

Conceptually, this is an anti-pattern where the query-building layer treats input as trusted structure rather than untrusted data, allowing user-provided content to influence both the data and control flow of the SQL statement.

Potential impact

  • Read access to database tables that the application's DB user can query.
  • Modification or deletion of records, leading to data loss or integrity violations.
  • Creation or alteration of application accounts and authorization data.
  • Bypassing of application-level authorization checks via manipulated WHERE clauses.
  • Potential execution of database-specific administrative operations, depending on configured privileges.
  • Escalation to broader system compromise if chained with database-native features (e.g., xp_cmdshell-like extensions, external procedures, or file read/write capabilities).

General mitigation guidance

For this class of vulnerability, mitigations are most effective when they focus on systematically separating data from query structure and limiting trust in any dynamic query inputs:

  • Prefer parameterized queries (prepared statements, bound parameters) at every layer where SQL commands are constructed.
  • Use a safe query builder or ORM abstraction that encodes parameters separately from SQL syntax and avoids concatenating raw text.
  • Treat the RSQL / wrapper layer as untrusted input: enforce a strict schema or whitelist of allowed fields, operators, and value formats before translating to SQL.
  • Normalize and validate inputs against expected types (e.g., integers, enums, bounded lengths) and reject or constrain anything outside defined patterns.
  • Limit the database account used by the application to least-privilege capabilities: only the tables and operations necessary for normal behavior.
  • Centralize query-generation utilities to make it easier to apply consistent safeguards and conduct targeted security reviews of SQL construction logic.

How teams detect issues like this

Detection typically combines code-focused and behavior-focused approaches:

  • Static analysis: Configure rules to flag direct string concatenation or formatting that combines SQL keywords or operators with externally derived values; highlight the RSQLToSQLNodeConnector.makeVariable and similar translation functions as high-risk hotspots.
  • Code review: Examine query-wrapper and DSL-to-SQL conversion layers for instances where input is treated as a fragment of SQL rather than as a bound parameter; look for custom parsing logic that bypasses ORM or prepared statement mechanisms.
  • Dynamic testing: Use automated or manual penetration testing tools to send crafted RSQL or filter expressions and observe whether error messages, timing, or response content indicate SQL injection behavior.
  • Database monitoring: Enable logging of executed queries and alert on unusual patterns such as concatenated literals, stacked statements (where supported), tautological conditions, or unexpected schema references.
  • Policy enforcement: Integrate secure coding guidelines and automated checks into CI/CD pipelines to prevent new query-building code from using ad-hoc string concatenation.

Sources

SourceLink
github.comgithub.com/SourByte05/SourByte-Lab/issues/12
vuldb.comvuldb.com/submit/809886
vuldb.comvuldb.com/vuln/364322
vuldb.comvuldb.com/vuln/364322/cti

Frequently asked

questions

Yes. As described, the vulnerable interface is reachable remotely, so any attacker who can send requests to endpoints using queryListByWrapper may attempt exploitation, subject to network and access controls.

Typically, they only need the ability to invoke the affected functionality (e.g., authenticated or unauthenticated access to the relevant API or UI). They do not need direct database access; they exploit the application as a proxy to the database.

Refactor the query translation layer so it constructs SQL exclusively with prepared statements or parameterized queries, and ensure that all user-influenced values are bound parameters rather than injected into SQL text. Combine this with strict whitelisting of allowable fields and operators in the wrapper/DSL.

Standardize on secure data access patterns (ORMs or vetted query builders), enforce coding guidelines that prohibit raw SQL string concatenation with untrusted input, and integrate automated security checks and focused reviews for any component that translates high-level filters or DSLs into SQL.

Find out what's already
exploitable in your codebase.