CVE-2026-116331

8.8High

Published 12 Nov 2026 · NVD status: Awaiting Analysis · AI triage by gemini-3.1-flash-lite

8.8CVSS

High

0CVSS v3.110

Attack vector
Network
Complexity
Low
Privileges
Low
User action
None
Impact
Full C/I/A compromise
Weakness
CWE-843

What an attacker gets

Authenticated attackers can execute arbitrary code as the database system user. This requires the ability to create a user-defined aggregate with a malicious SORTOP option.

Root cause

A type confusion vulnerability exists in the min/max aggregate optimization where the planner incorrectly treats input and result types as identical.

Affected versions

PostgreSQL versions before 18.7, 17.12, 16.16, 15.20, and 14.25.

CVSS v3.1 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Fix & remediation

Upgrade to PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25 or later. Restrict the CREATE AGGREGATE privilege to trusted users until the patch is applied.

remediation — bash
$ sudo apt-get update && sudo apt-get install --only-upgrade postgresql

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD description

Type confusion in PostgreSQL min/max aggregate optimization allows an object creator to execute arbitrary code as the operating system user running the database, via a user-defined aggregate whose SORTOP option causes the planner to treat the aggregate's input and result as the same type when they differ. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-116331