/

CVE-2026-102491

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in kykms SqlInjectionUtil API

CVE-2026-102491

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized Database Access and Data Manipulation

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

A SQL injection vulnerability in kykms's SqlInjectionUtil component allows attacker-controlled column input to influence dynamically generated database queries. When the affected ordering functionality is reachable with insufficiently trusted input, a remote attacker may alter query behavior or access and modify database data.

Affected context

The issue occurs in the QueryGenerator.doMultiFieldsOrder function within QueryGenerator.java, where the column argument contributes to SQL generation. Deployments may be at risk when this functionality processes remotely supplied or indirectly controlled values without strict allowlisting and when the resulting query is executed with broader database privileges than required.

Exploit preconditions

  • Attack surface: A remotely reachable application feature that uses the SqlInjectionUtil ordering functionality
  • Required access: Ability to submit or influence the value of the column argument, potentially through an unauthenticated or authenticated request depending on the surrounding application
  • Trigger point: Query construction or execution through QueryGenerator.doMultiFieldsOrder
  • Why exploitation is possible: Untrusted input is incorporated into SQL structure without sufficiently restricting it to approved column identifiers

Why this happens

The underlying bug is improper neutralization of externally influenced input used in SQL statement construction. Dynamic identifiers such as column names cannot generally be made safe through ordinary value parameterization alone; they require strict mapping to known-safe fields before query generation. This behavior maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

Potential impact

  • An attacker may alter query logic or filtering behavior.
  • Unauthorized database records may be disclosed.
  • Data may be modified, deleted, or corrupted.
  • Database credentials or metadata may be exposed depending on permissions.
  • Application availability could be affected through resource-intensive queries.

General mitigation guidance

Mitigation generally centers on reducing trust in dynamic query inputs and ensuring database operations use the least privilege necessary.

Common defensive patterns include:

  • Map externally supplied sort and column names to a fixed allowlist of internal identifiers.
  • Use parameterized queries for values wherever the database interface supports them.
  • Keep query structure separate from user-controlled data.
  • Reject unknown, ambiguous, or malformed column selections before query generation.
  • Apply least-privilege database roles and limit write permissions for read-oriented features.
  • Enforce consistent validation at service boundaries rather than relying only on callers.
  • Avoid exposing detailed database errors to remote users.

How teams detect issues like this

Organizations can look for this vulnerability through:

  • Static analysis rules identifying string concatenation or templating of request-derived values into SQL.
  • Code review signals such as dynamic ORDER BY or field-selection logic without an explicit allowlist.
  • Tests that verify rejected identifiers cannot alter generated query structure.
  • Runtime monitoring for anomalous query shapes, unexpected database errors, and unusual access patterns.
  • Policy enforcement requiring parameterized database access and approved query-builder patterns.
  • Neutral automated security and code-review tools that flag SQL construction from untrusted sources.

Sources

SourceLink
github.comgithub.com/fangtang7/CVE/blob/main/kykms/sql.md
vuldb.comvuldb.com/cve/CVE-2026-102491
vuldb.comvuldb.com/submit/942093
vuldb.comvuldb.com/vuln/411276
vuldb.comvuldb.com/vuln/411276/cti

Frequently asked

questions

Potentially. Remote exploitation depends on whether an exposed application function passes attacker-influenced values to the affected query-generation path.

Not necessarily. The required access depends on the surrounding endpoint and its authentication and authorization controls; the important prerequisite is influence over the relevant column input.

Restrict dynamic column and ordering choices to a server-side allowlist, use parameterized queries for data values, and keep database execution privileges narrowly scoped.

Enforce secure query-construction standards, review dynamic SQL paths, test boundary inputs, apply static analysis, and monitor database activity for unexpected query behavior.

Find out what's already
exploitable in your codebase.