CVE-2026-26198: ormar is vulnerable to SQL Injection through aggregate functions min() and max()
Affects ormarSource GCVE Database
Not known to be exploited · CVSS 9.8 Critical : upgrade to 0.23.0 as a priority.
Data as of 16 Nov 2026, 16:49 UTC
- 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: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
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), the Metasploit, Exploit-DB and nuclei-templates index as of 15 Nov 2026.
What to do
Upgrade ormar to 0.23.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIormar | 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
A patch fixing this vulnerability is available in ormar version 0.23.0. Users should upgrade to version 0.23.0 or later to remediate this issue. Until upgrading, avoid using the min() and max() aggregate functions with untrusted input or implement strict input validation to prevent injection. No other mitigations are documented by the vendor.
Description
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.
References
- github.com/collerek/ormar/security/advisories/GHSA-xxh2-68g9-8jqr (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-26198 (opens in a new tab)
- github.com/collerek/ormar/commit/a03bae14fe01358d3eaf7e319fcd5db2e4956b16 (opens in a new tab)
- github.com/collerek/ormar (opens in a new tab)
- github.com/collerek/ormar/releases/tag/0.23.0 (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/ormar/PYSEC-2026-439.yaml (opens in a new tab)
- pypi.org/project/ormar (opens in a new tab)