Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

PostgreSQL Aggregate Type Confusion (CVE-2026-116331)

CVE-2026-116331 is a type confusion flaw in PostgreSQL's core min/max aggregate optimization.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-116331
Vendor
PostgreSQL Global Development Group
Affected Product
PostgreSQL core server
Exploitation
Not confirmed
Published
2026-11-12

PostgreSQL says a user who can create objects may execute arbitrary code as the database's operating system user. The project fixed the flaw on 12 November 2026 in five supported version branches.PostgreSQL scores the issue 8.8 under CVSS 3.0. NVD also records a secondary CVSS 3.1 score of 8.8 and classifies it as CWE-843. Neither record in the 19 November source pack gives a CVSS 4.0 score. A published research chain demonstrates the consequence, but it does not establish an intrusion in a production environment.

What it allows

How Does CVE-2026-116331 Work?

PostgreSQL lets a custom aggregate use a sort operator to take an indexed min/max shortcut. Depthfirst explains that the shortcut could skip the aggregate's final function when it converted the result into another type. The planner then returned the indexed value while the expression evaluator treated it as the declared result type.

This mismatch is type confusion in the core server. The research describes a chain from that mismatch to code execution under the database operating system account. It is a researcher demonstration, not evidence that an attacker has used the chain against a named organization.

Depthfirst says a default login role can use its inherited TEMPORARY privilege to create session-local objects and reach the affected planner path. That makes accounts with narrow access to persistent tables relevant to triage. An attacker still needs a usable database login and object-creation ability in the stated scenario.

The Vulnerability Intelligence platform is a relevant product resource for tracking the advisory and remediation decision. For this CVE, the immediate decision is whether each running server branch is below its fixed release. The vulnerability prioritization process can record login reachability and temporary-object privileges alongside that version check.

From 21 August through 19 November 2026, Brandefense Blackhole counted one dark-chat post mentioning CVE-2026-116331. The measured unit is a post mentioning the identifier, not a compromised database. This discussion signal cannot establish active exploitation. The 19 November GitHub search in our source pack counted one public repository whose name included the CVE; the count likewise does not prove use against a target.

Who is affected

Which PostgreSQL Versions Are Affected by CVE-2026-116331?

PostgreSQL lists affected branches 18, 17, 16, 15 and 14, with fixes in 18.7, 17.12, 16.16, 15.20 and 14.25 respectively. Earlier patch releases within each listed branch are affected. The advisory does not provide a separate configuration exception or a status for older unsupported branches.

Check the server version actually running, not only the installed package. Compare its major branch with PostgreSQL's corresponding fixed release, and account for any vendor package that backports the security fix. When a distribution uses a backport, confirm its security notice or package changelog rather than assuming the upstream version string alone settles exposure.

Depthfirst's chain used a login role with inherited TEMPORARY privilege, allowing session-local objects even without access to application tables. Review which roles can connect and create temporary objects while scheduling the upgrade. Restricting unnecessary login or temporary-object privileges can narrow exposure, but the PostgreSQL fix remains the primary remediation. Record the before and after versions in the patch management process.

Timeline

  1. 2026-11-12

    PostgreSQL published the advisory and fixed releases 18.7, 17.12, 16.16, 15.20 and 14.25.

  2. 2026-11-18

    Depthfirst published its research and a proof-of-concept chain for the PostgreSQL flaw.

What to do

  1. Inventory running servers

    Record each PostgreSQL server's running major and minor release, package source, and database roles that can log in.

  2. Prioritize exposed roles

    Review which login roles inherit TEMPORARY privilege and can create session-local objects. Include narrowly granted application roles in the review.

  3. Upgrade the affected branch

    Move 18 to at least 18.7, 17 to 17.12, 16 to 16.16, 15 to 15.20, or 14 to 14.25. Follow the distribution's advisory for backported packages.

  4. Verify after maintenance

    Confirm the running server reports the intended fixed release after restart, or document the distribution's backported fix. Save the result with the change record.

  5. Review relevant activity

    Review available database logs for unexpected creation of aggregates and temporary objects by low-privilege roles. This is defensive triage guidance, not a published detection signature.

What Brandefense can do

Frequently Asked Questions

Can a low-privilege PostgreSQL role reach CVE-2026-116331?

Depthfirst demonstrated a chain using a default login role with inherited TEMPORARY privilege. The role could create session-local objects without access to application tables.

Which PostgreSQL releases fix the aggregate flaw?

PostgreSQL names 18.7, 17.12, 16.16, 15.20 and 14.25 as fixed releases. Match the fix to the running major branch.

Does the published research prove active exploitation?

No. It describes a proof-of-concept chain. The available primary sources do not establish a production intrusion; the observed discussion and repository counts are not incident counts.

Is restricting TEMPORARY privilege enough?

No. Reviewing unnecessary privileges may narrow the demonstrated path, but PostgreSQL's fixed release is the primary remediation. Verify the running version afterward.

Sources

  1. CVE-2026-116331 Security AdvisoryPostgreSQL Global Development Group
  2. Narrow Grants, Wide EnginesDepthfirst
  3. CVE-2026-116331NIST National Vulnerability Database
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →