Skip to content
Heist/ feed
UnratedFix available

DEBIAN-CVE-2026-26198

Type: advisorySource: OSV1 source record

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.

Announced Source revision 1
Original source ↗

DEBIAN-CVE-2026-26198

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:DEBIAN-CVE-2026-26198

ormar

Source reference: /affected/0/package/name

Affected versions
0.12.0-3

Source reference: /affected/0/versions

0.12.2-1

Source reference: /affected/0/versions

0.20.2-1

Source reference: /affected/0/versions

0.21.0-1

Source reference: /affected/0/versions

0.22.0-1

Source reference: /affected/0/versions

0.23.0-1

Source reference: /affected/0/versions

0.23.1-1

Source reference: /affected/0/versions

0.24.0-1

Source reference: /affected/0/versions

0.24.0-2

Source reference: /affected/0/versions

Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

ormar

Source reference: /affected/1/package/name

Affected versions
0.11.2-1

Source reference: /affected/1/versions

0.11.2-2

Source reference: /affected/1/versions

0.11.2-3

Source reference: /affected/1/versions

0.11.3-1

Source reference: /affected/1/versions

0.12.0-1

Source reference: /affected/1/versions

0.12.0-2

Source reference: /affected/1/versions

0.12.0-3

Source reference: /affected/1/versions

0.12.2-1

Source reference: /affected/1/versions

0.20.2-1

Source reference: /affected/1/versions

0.21.0-1

Source reference: /affected/1/versions

0.22.0-1

Source reference: /affected/1/versions

Fixed versions
0.23.0-1

Source reference: /affected/1/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "0"
          }
        ]
      }
    ],
    "package": {
      "name": "ormar",
      "purl": "pkg:deb/debian/ormar?arch=source&distro=bookworm",
      "ecosystem": "Debian:12"
    },
    "versions": [
      "0.12.0-3",
      "0.12.2-1",
      "0.20.2-1",
      "0.21.0-1",
      "0.22.0-1",
      "0.23.0-1",
      "0.23.1-1",
      "0.24.0-1",
      "0.24.0-2"
    ],
    "database_specific": {
      "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-26198.json"
    },
    "ecosystem_specific": {
      "urgency": "not yet assigned"
    }
  },
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "0.23.0-1"
          }
        ]
      }
    ],
    "package": {
      "name": "ormar",
      "purl": "pkg:deb/debian/ormar?arch=source&distro=forky",
      "ecosystem": "Debian:14"
    },
    "versions": [
      "0.11.2-1",
      "0.11.2-2",
      "0.11.2-3",
      "0.11.3-1",
      "0.12.0-1",
      "0.12.0-2",
      "0.12.0-3",
      "0.12.2-1",
      "0.20.2-1",
      "0.21.0-1",
      "0.22.0-1"
    ],
    "database_specific": {
      "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-26198.json"
    },
    "ecosystem_specific": {
      "urgency": "not yet assigned"
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#56700 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement