CVE-2026-26198

Source
https://cve.org/CVERecord?id=CVE-2026-26198
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-26198.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-26198
Aliases
Downstream
Published
2026-02-24T02:03:47.094Z
Modified
2026-03-03T02:56:09.848162Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
ormar is vulnerable to SQL Injection through aggregate functions min() and max()
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/26xxx/CVE-2026-26198.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-89"
    ]
}
References

Affected packages

Git / github.com/collerek/ormar

Affected ranges

Type
GIT
Repo
https://github.com/collerek/ormar
Events
Database specific
{
    "versions": [
        {
            "introduced": "0.9.9"
        },
        {
            "fixed": "0.23.0"
        }
    ]
}

Affected versions

0.*
0.10.0
0.10.1
0.10.10
0.10.11
0.10.12
0.10.13
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
0.10.2
0.10.20
0.10.21
0.10.22
0.10.23
0.10.24
0.10.25
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.11.0
0.11.1
0.11.2
0.11.3
0.12.0
0.12.1
0.12.2
0.20.1
0.20.2
0.21.0
0.22.0
0.9.9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-26198.json"

Git / github.com/ormar-orm/ormar

Affected ranges

Type
GIT
Repo
https://github.com/ormar-orm/ormar
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Introduced
Fixed

Affected versions

0.*
0.10.0
0.10.1
0.10.10
0.10.11
0.10.12
0.10.13
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
0.10.2
0.10.20
0.10.21
0.10.22
0.10.23
0.10.24
0.10.25
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.11.0
0.11.1
0.11.2
0.11.3
0.12.0
0.12.1
0.12.2
0.20.1
0.20.2
0.21.0
0.22.0
0.9.9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-26198.json"