Ormar ORM versions 0.9.9 through before 0.23.0 are vulnerable to SQL Injection via the min() and max() aggregate functions. These functions accept user-supplied column names without validation or sanitization, embedding them directly into raw SQL expressions. This allows attackers to inject arbitrary SQL, including subqueries, potentially exposing the entire database contents. The vulnerability arises because the min() and max() methods do not perform the numeric field validation that sum() and avg() do. A fix is available in version 0.23.0.