Uncontrolled Search Path Element Affecting org.postgresql:postgresql package, versions [,42.7.15)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.37% (32nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGPOSTGRESQL-22957227
  • published25 Nov 2026
  • disclosed23 Nov 2026
  • creditAnthropic OSS Scanner

Introduced: 23 Nov 2026

NewCVE-2026-134844  (opens in a new tab)
CWE-427  (opens in a new tab)

How to fix?

Upgrade org.postgresql:postgresql to version 42.7.15 or higher.

Overview

org.postgresql:postgresql is a Java JDBC 4.2 (JRE 8+) driver for PostgreSQL database.

Affected versions of this package are vulnerable to Uncontrolled Search Path Element in the TypeInfoCache, PgDatabaseMetaData and PgResultSetMetaData classes, whose catalog queries use unqualified operators and functions, and whose type lookups rank an unqualified type name by current_schemas(false), which leaves out pg_catalog. A user with CREATE on a schema of the application's search_path can execute SQL with the application role's privileges by defining an operator with an exact type match that pg_catalog lacks (such as oid = int4 or name = varchar), which runs when the application calls metadata methods such as getTableName() or getTables(). A user with only the default TEMP privilege can do the same by creating a domain with a built-in type name such as interval in their temporary schema, whose CHECK then runs in the application's session when the application binds a value of that type, for example a PGInterval parameter. This requires the application to call the affected metadata methods or to bind such typed values.

Workaround

This vulnerability can be avoided, for the operator case, by ensuring no schema on the application role's search_path is writable by other roles.

CVSS Base Scores

version 4.0
version 3.1