---
id: "CVE-2026-116303"
page: "https://infrastack.ai/live/CVE-2026-116303"
kind: "vulnerability"
aliases: ["CVE-2026-116303"]
title: "PostgreSQL: type conversion lets a database user run restricted cast functions"
severity: "low"
cvss: 3.1
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["database", "postgresql", "runtime", "self-hosted"]
not_affected_if: ["no-restricted-cast-functions", "patched-version"]
published_at: "2026-11-12T15:17:37+00:00"
first_seen_at: "2026-11-12T15:41:53+00:00"
updated_at: "2026-11-12T15:44:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116303", "first_seen_at": "2026-11-12T15:41:53+00:00"}]
exploit_sources: []
---

# PostgreSQL: type conversion lets a database user run restricted cast functions

Link for people: https://infrastack.ai/live/CVE-2026-116303 (this .md is for agents)

PostgreSQL does not check EXECUTE privilege when certain type conversions (foreign keys, to_json() and others) invoke a cast function. A database user without EXECUTE rights on that cast function can still trigger it, which may expose data in rare cases.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the PostgreSQL server version with `SELECT version();` and compare it to the fixed versions below.

## Fix

- PostgreSQL `18.7`
- PostgreSQL `17.12`
- PostgreSQL `16.16`
- PostgreSQL `15.20`
- PostgreSQL `14.25`

## Timeline

- 2026-11-12T15:41:53+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116303

## From the sources

Missing authorization in PostgreSQL type conversion allows a database user to invoke a cast function despite lacking EXECUTE privilege on that function, via foreign keys, to_json(), and others.  A successful attack requires the attacker to search each database for access-restricted cast functions and identify confidentiality impact specific to each function implementation found.  There are few or no practical examples of an access-restricted cast function or of a cast function having confidentiality impact.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
