CVE-2026-16238 PUBLISHED

PostgreSQL type confusion in pg_restore_attribute_stats() executes arbitrary code

Assigner: PostgreSQL
Reserved: 20.07.2026 Published: 13.08.2026 Updated: 13.08.2026

Type confusion in PostgreSQL pg_restore_attribute_stats() allows an object creator to execute arbitrary code as the operating system user running the database, via conflation of range and multirange values. Within major version 18, minor versions before PostgreSQL 18.5 are affected. Versions before PostgreSQL 18 are unaffected.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 8.8

Product Status

Vendor n/a
Product PostgreSQL
Versions Default: unaffected
  • affected from 18 to 18.5 (excl.)

Affected Configurations

attacker has permission to create objects (temporary objects or non-temporary objects in at least one schema)

Workarounds

Revoke public EXECUTE permission on the function

Credits

  • The PostgreSQL project thanks Amy Burnett (OpenAI Codex Security) for reporting this problem.

References

Problem Types

  • Access of Resource Using Incompatible Type ('Type Confusion') CWE