CVE-2026-116331 · Runtime
NO FIX YET · SEE WHAT TO DO
A flaw in how PostgreSQL's planner handles min/max aggregates lets a user who can create objects define an aggregate with a SORTOP option that makes the planner mix up input and result types. The attacker can then execute arbitrary code as the operating system user running the database.
first public Nov 12, 2026 · 1 source
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
PostgreSQL servers before the fixed versions are affected when an account that can create objects, such as a user with CREATE privilege, is untrusted or compromised. Servers where only trusted administrators can create objects have a much smaller exposure. Managed database services should be checked against their own patch notes.
Not affected if managed-hosting, only-trusted-object-creators
Who cares database, postgresql, self-hosted
SELECT version(); in psql and compare against the fixed versions below.18.7, 17.12, 16.16, 15.20, or 14.25 depending on the major version in use.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.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.