/

CVE-2026-94144

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Drogon ORM Criteria Builder

CVE-2026-94144

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access, data modification, or query 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 Drogon's ORM criteria-building logic may allow attacker-controlled filter input to alter generated database queries. Because the vulnerable path can be reached remotely in applications that expose affected functionality, attackers could access, modify, or disrupt data depending on database permissions.

Affected context

The issue occurs in applications using Drogon's ORM component and the makeCriteria function to construct database criteria from externally influenced filter values. Risk is higher when remote requests can reach this functionality and application input is incorporated into query expressions without sufficient parameterization or constrained query construction.

Exploit preconditions

  • Attack surface: A remotely reachable application endpoint or service that uses Drogon's ORM filtering functionality
  • Required access: Ability to submit or influence filter-related request parameters; authentication requirements depend on the application's access controls
  • Trigger point: Processing attacker-controlled input through makeCriteria in the ORM component
  • Why exploitation is possible: Untrusted filter data may influence SQL query structure rather than being handled solely as parameter values

Why this happens

The underlying bug is improper separation between data and SQL command structure during ORM criteria construction. When externally controlled filter input is incorporated into query expressions without robust parameter binding, an attacker may inject SQL syntax into the resulting statement. This 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 read unauthorized database records
  • An attacker could alter or delete application data
  • Crafted queries may cause database errors or service disruption
  • Database credentials or connected systems may be exposed depending on permissions
  • Successful exploitation could support further compromise of the application environment

General mitigation guidance

Mitigation generally focuses on preserving a strict boundary between query structure and user-controlled values.

Common defensive patterns include:

  • Using parameterized queries and bound ORM values for externally supplied data
  • Allowing only explicitly supported fields, operators, and sort directions through an allowlist
  • Avoiding direct concatenation of request data into SQL fragments
  • Applying consistent input validation before criteria construction
  • Restricting database accounts to the minimum permissions required by the application
  • Separating read and write database identities where practical
  • Enforcing authentication, authorization, and rate limits on query-bearing endpoints

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying string concatenation or interpolation near SQL and ORM query builders
  • Code review checks for criteria APIs that accept raw expressions or unrestricted filter names and operators
  • Runtime monitoring for anomalous query syntax, unexpected database errors, and unusual read or write patterns
  • Tests that verify externally supplied values remain bound parameters rather than query structure
  • Policy enforcement requiring approved query-builder abstractions and parameterization patterns
  • Neutral automated review tools that flag potential CWE-74 and CWE-89 data-flow paths

Sources

SourceLink
gist.github.comgist.github.com/2H-K/bf8328f70f72196545b0d9589367cb6a
github.comgithub.com/drogonframework/drogon/
github.comgithub.com/drogonframework/drogon/issues/2576
vuldb.comvuldb.com/cve/CVE-2026-94144
vuldb.comvuldb.com/submit/893929
vuldb.comvuldb.com/vuln/408059
vuldb.comvuldb.com/vuln/408059/cti

Frequently asked

questions

It may be remotely exploitable when an application exposes an endpoint that passes attacker-controlled filter input into the affected ORM criteria-building path. The exact scope depends on routing, authentication, authorization, and database permissions.

Not necessarily. Authentication is required only if the vulnerable endpoint or filter functionality is protected by the application. Any account with access to the relevant feature may be sufficient if input is not safely handled.

Keep SQL structure separate from user data by using parameterized queries or ORM binding APIs. Constrain selectable fields and operators to a defined allowlist rather than accepting arbitrary query fragments.

Combine secure query-construction patterns with code review, static analysis, negative testing, least-privilege database accounts, and monitoring for abnormal query behavior.

Find out what's already
exploitable in your codebase.