CVE-2026-26198Collerek Ormar
High 7.5 No auth needed
Follow: this CVE · Collerek · Collerek Ormar We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- —
- Auth required
- No
- Published
- Feb 24, 2026
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-89
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Ormar.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | ormar |
≥ 0.9.9 < 0.23.0 |
0.23.0 |
pip install "ormar>=0.23.0" |
| PyPI | ormar |
≥ 0.9.9 < 0.23.0 |
0.23.0 |
pip install "ormar>=0.23.0" |
Per OSV / GitHub Advisories (GHSA-xxh2-68g9-8jqr, PYSEC-2026-439). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| collerek | ormar | ≥ 0.9.9 < 0.23.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Product Release Notes
- github.com Exploit Vendor Advisory