CVE-2026-26198: collerek ormar · SQL Injection
Affects collerek ormarSource CVE Database V5
Not known to be exploited · CVSS 9.8 Critical : upgrade to 0.23.0 as a priority.
Data as of 29 Oct 2026, 19:04 UTC
- EPSS
- 1.0% chance of exploitation in 30 days – higher than 63% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.23.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 24 Feb 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade collerek ormar to 0.23.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| collerekormar | Affected
| Fixed in
|
PyPIormarpkg:pypi/ormarOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate this vulnerability, organizations should immediately upgrade Ormar to version 0.23.0 or later, where the issue is patched. Until upgrading, avoid using the min() and max() aggregate methods with user-supplied input. Implement strict input validation and sanitization on any parameters that influence database queries, especially those passed to aggregate functions. Employ parameterized queries and avoid constructing SQL statements with raw user input. Conduct a thorough code audit to identify any usage of vulnerable Ormar versions and review query construction patterns. Additionally, implement database access controls and least privilege principles to limit the damage potential if exploitation occurs. Monitor application logs for unusual query patterns indicative of injection attempts. Consider deploying Web Application Firewalls (WAFs) with rules targeting SQL injection payloads as an additional layer of defense. Finally, educate developers on secure coding practices related to ORM usage and SQL injection prevention.
Description
Ormar is a async mini ORM for Python. In versions 0.9.9 through 0.22.0, when performing aggregate queries, Ormar ORM constructs SQL expressions by passing user-supplied column names directly into `sqlalchemy.text()` without any validation or sanitization. The `min()` and `max()` methods in the `QuerySet` class accept arbitrary string input as the column parameter. While `sum()` and `avg()` are partially protected by an `is_numeric` type check that rejects non-existent fields, `min()` and `max()` skip this validation entirely. As a result, an attacker-controlled string is embedded as raw SQL inside the aggregate function call. Any unauthorized user can exploit this vulnerability to read the entire database contents, including tables unrelated to the queried model, by injecting a subquery as the column parameter. Version 0.23.0 contains a patch.