CVE-2026-134844: pgjdbc catalog queries can run objects of other database roles
pgjdbc, the PostgreSQL JDBC Driver, uses unqualified operators and functions in the catalog queries of DatabaseMetaData, ResultSetMetaData and TypeInfoCache. A role with CREATE on a schema of the application's searchpath can add an operator with an exact type match, and the server runs it with the privileges of the application's role. TypeInfoCache also resolves an unqualified type name such as interval by its own ranking. A domain with that name in another schema, even the temporary schema of another session, can be used instead, and its CHECK runs in the application's session. All versions before 42.7.15 are affected, and 42.7.15 fixes the problem.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 42.7.15
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using pgjdbc versions earlier than 42.7.15 are affected when a role can create objects in a schema included in the application's search_path. The issue applies to catalog queries used by DatabaseMetaData, ResultSetMetaData, and TypeInfoCache.
What access does an attacker need?
An attacker needs a database role with CREATE permission on a schema in the application's search_path. They can create an operator with an exact type match or a domain whose name is selected by TypeInfoCache's unqualified type resolution.
What is the impact of successful exploitation?
The database server can execute the attacker-controlled operator or a domain CHECK expression using the privileges of the application's database role. This can affect confidentiality, integrity, and availability.
What should be done if upgrading cannot happen immediately?
Remove or restrict CREATE privileges for untrusted roles on every schema in the application's search_path. This reduces the ability to place malicious operators or domains where pgjdbc's unqualified catalog queries can resolve them.
How is this remediated?
Upgrade the PostgreSQL JDBC Driver to version 42.7.15, which fixes the issue. All versions before 42.7.15 are affected.