CVE-2026-134844 in pgjdbcinfo

Summary

by MITRE • 11/23/2026

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 search_path 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.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/23/2026

The PostgreSQL JDBC Driver, known as pgjdbc, contains a critical security vulnerability related to how it constructs catalog queries for retrieving database metadata and type information. Specifically, versions prior to 42.7.15 utilize unqualified operators and functions within these queries. This design choice creates an ambiguity in name resolution that can be exploited by malicious actors under specific privilege conditions. The core issue lies in the reliance on the PostgreSQL search_path mechanism without sufficient qualification of schema names for critical database objects, allowing potential manipulation of query execution paths through namespace pollution or injection techniques.

The technical flaw manifests primarily in two areas: DatabaseMetaData and TypeInfoCache operations. In the context of DatabaseMetaData queries involving operators, a role possessing CREATE privileges on any schema within the application's search_path can introduce an operator with an exact type match to that name. When the JDBC driver executes these unqualified queries, the PostgreSQL server resolves the operator based on the current search path rather than explicitly targeting system catalogs or specific safe schemas. Consequently, if a malicious user has created such an operator in a schema they control and which appears early enough in the search_path, the database will execute this attacker-controlled operator instead of the intended standard one. This execution occurs with the privileges of the application's role, effectively escalating the impact of the vulnerability to that higher privilege level.

A similar but distinct vector exists within TypeInfoCache, which handles type resolution for JDBC operations such as setting and getting parameters. The driver resolves unqualified type names like interval using its own internal ranking logic rather than relying solely on database-level schema qualification. This allows an attacker to create a domain with the same name in another schema, including temporary schemas belonging to other sessions. When the application attempts to resolve this type, it may inadvertently select the maliciously crafted domain instead of the standard system type. The CHECK constraints defined within such a custom domain are then executed within the context of the application's session. This can lead to unexpected behavior, denial of service through constraint violations, or potentially more severe impacts depending on how these checks interact with subsequent database operations and data integrity rules.

The operational impact of this vulnerability is significant for applications that rely heavily on metadata introspection and dynamic type handling via JDBC. An attacker who has been granted CREATE privileges in any schema accessible to the application can manipulate the behavior of critical driver functions without needing direct write access to system tables or high-level administrative rights. This represents a classic case of privilege escalation through namespace manipulation, where lower-privileged users can influence higher-privileged processes by exploiting ambiguous name resolution. The attack does not require complex exploitation chains; it relies on standard SQL features and the specific implementation details of how pgjdbc constructs its metadata queries.

This vulnerability aligns with CWE-610, which describes Externally Controlled Reference to a Resource in Another Sphere, as well as CWE-78, Improper Neutralization of Special Elements used in an OS Command, depending on the specific exploitation path involving operator injection. In terms of MITRE ATT&CK framework classifications, this behavior relates to techniques involving resource hijacking and potentially privilege escalation through ambiguous object resolution. The lack of explicit schema qualification for critical database objects violates best practices for secure coding in relational databases, where all references should be fully qualified to prevent namespace collisions or malicious overrides.

To mitigate this vulnerability, organizations must immediately upgrade the pgjdbc driver to version 42.7.15 or later, which addresses these issues by ensuring proper schema qualification and safer resolution logic. Additionally, database administrators should review role privileges and minimize the number of schemas where application roles have CREATE authority. Implementing strict search_path configurations that prioritize system schemas over user-controlled ones can further reduce the risk surface. Regular auditing of object creation in shared or accessible schemas is also recommended to detect any unauthorized attempts to inject malicious operators or domains into the database environment.

Responsible

PostgreSQL

Reservation

11/22/2026

Disclosure

11/23/2026

Moderation

accepted

CPE

ready

EPSS

0.00640

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!