CVE-2026-116303: PostgreSQL foreign key and JSON conversions bypass EXECUTE privilege on cast functions
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, tojson(), 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 18.7 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 17.12 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 16.16 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 15.20 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 14.25
Event History
Frequently Asked Questions
Which PostgreSQL installations are affected?
PostgreSQL versions before 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
What access does an attacker need to exploit this issue?
The attacker must already be a database user with low privileges. They must identify an access-restricted cast function in a database and a confidentiality impact specific to that function's implementation.
Are default deployments likely to be exposed?
Practical exposure appears limited: there are few or no known practical examples of access-restricted cast functions or cast functions with confidentiality impact. Exposure depends on custom or otherwise restricted cast functions present in each database.
How can I assess whether a database is at risk?
Review each database for cast functions that restrict EXECUTE access, then determine whether invoking those functions could disclose confidential information. The affected invocation paths include foreign keys and JSON conversion functions such as to_json().