# GHSA-J75G-99Q3-VR5C: pgjdbc catalog queries can run objects of other database roles

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-11-23
- Modified: 2026-11-23

## Tracked as

- [CVE-2026-134844](https://cve.now/CVE-2026-134844.md): pgjdbc remote code execution via unqualified catalog queries

## Affected versions

- org.postgresql:postgresql (Maven): through 42.7.14

## Description

### Summary

Some pgjdbc catalog queries used unqualified operators, functions and type names. Another database role could supply its own and have them run in the application's session.


### Details

The queries of `DatabaseMetaData`, `ResultSetMetaData` and `TypeInfoCache` used unqualified operators and functions. Some compare types such as `oid` and `int4` that have no exact match in `pg_catalog`. A role with CREATE on a schema of the search_path could add an exact match. The server then ran it as the caller.

TypeInfoCache resolved an unqualified type name, such as `interval` for a `PGInterval` parameter, by its own ranking. A type or domain with the same name in another schema could win, even one in the temporary schema of another session. The server then ran the CHECK of that domain in the application's session.


### Proof of concept

```sql
-- An attacker with CREATE on schema s, which is on the application's search_path.
CREATE FUNCTION s.f(oid, int4) RETURNS bool LANGUAGE plpgsql AS 'BEGIN RETURN true; END';
CREATE OPERATOR s.= (LEFTARG = oid, RIGHTARG = int4, PROCEDURE = s.f);
```

```java
rs.getMetaData().getTableName(1); // Runs s.f as the application's role.
```


### Impact

A database role that can create objects in a schema of the application's search_path can run SQL with the privileges of the application's role. The type name case needs only the TEMP privilege, which every role has by default. The application must call metadata methods or use types such as `PGInterval`.

## References

- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-j75g-99q3-vr5c

Page: https://cve.now/GHSA-J75G-99Q3-VR5C

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
