2026-11-23 16:59CVE-2026-134844PostgreSQL
PUBLISHED5.2CWE-427

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

Problem type

Affected products

pgjdbc

pgjdbc

< 42.7.15 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-134844
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-134844",
    "assignerOrgId": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
    "assignerShortName": "PostgreSQL",
    "dateUpdated": "2026-11-23T16:59:16.142Z",
    "dateReserved": "2026-11-22T17:13:47.180Z",
    "datePublished": "2026-11-23T16:59:16.142Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
        "shortName": "PostgreSQL",
        "dateUpdated": "2026-11-23T16:59:16.142Z"
      },
      "title": "pgjdbc catalog queries can run objects of other database roles",
      "descriptions": [
        {
          "lang": "en",
          "value": "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."
        }
      ],
      "affected": [
        {
          "vendor": "pgjdbc",
          "product": "pgjdbc",
          "collectionURL": "https://repo.maven.apache.org/maven2",
          "packageName": "org.postgresql:postgresql",
          "programFiles": [
            "pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java",
            "pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSetMetaData.java",
            "pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java"
          ],
          "programRoutines": [
            {
              "name": "org.postgresql.jdbc.TypeInfoCache.getPGType"
            },
            {
              "name": "org.postgresql.jdbc.PgResultSetMetaData.fetchFieldMetaData"
            },
            {
              "name": "org.postgresql.jdbc.PgDatabaseMetaData.getTables"
            },
            {
              "name": "org.postgresql.jdbc.PgDatabaseMetaData.getColumns"
            }
          ],
          "repo": "https://github.com/pgjdbc/pgjdbc",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "maven",
              "lessThan": "42.7.15"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-427 Uncontrolled Search Path Element",
              "cweId": "CWE-427",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-j75g-99q3-vr5c",
          "tags": [
            "vendor-advisory"
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "version": "3.1",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "attackVector": "NETWORK",
            "attackComplexity": "HIGH",
            "privilegesRequired": "LOW",
            "userInteraction": "NONE",
            "scope": "UNCHANGED",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "availabilityImpact": "HIGH",
            "baseScore": 7.5,
            "baseSeverity": "HIGH"
          }
        }
      ],
      "workarounds": [
        {
          "lang": "en",
          "value": "Do not grant CREATE on schemas of the application's search_path to untrusted roles, and revoke TEMP from them."
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "value": "Upgrade to pgjdbc 42.7.15 or later."
        }
      ],
      "timeline": [
        {
          "time": "2026-10-16T00:00:00.000Z",
          "lang": "en",
          "value": "Reported by Anthropic OSS Scanner (ANT-2026-96Q8LC5K)."
        },
        {
          "time": "2026-10-16T00:00:00.000Z",
          "lang": "en",
          "value": "Reported by Anthropic OSS Scanner (ANT-2026-XWDO8ONS)."
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Anthropic OSS Scanner (ANT-2026-96Q8LC5K)",
          "type": "finder"
        },
        {
          "lang": "en",
          "value": "Anthropic OSS Scanner (ANT-2026-XWDO8ONS)",
          "type": "finder"
        }
      ]
    }
  }
}