---
id: CVE-2026-134841
title: >-
  pgjdbc, the PostgreSQL JDBC Driver, misreads some quoted text in its query
  parser
summary: >-
  pgjdbc, the PostgreSQL JDBC Driver, misreads some quoted text in its query
  parser. A `}` inside a literal ends a JDBC escape such as `{ts}`, and the rest
  of the literal is translated as SQL. A dollar quote whose tag has a non-ASCII
  symbo…
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-89
vendor: pgjdbc
product: 'org.postgresql:postgresql'
affected:
  - 'org.postgresql:postgresql < 42.7.15'
published: '2026-11-23'
updated: '2026-11-24'
sourceUpdated: '2026-11-24T18:56:39.360'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-134841'
references:
  - url: 'https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-4743-5rfh-f7mp'
    label: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
  - url: 'https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-4743-5rfh-f7mp'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-11-23T19:35:32.345928Z'
ingestedAt: '2026-11-23T20:35:33.366Z'
epss: 0.00421
epssPercentile: 0.36917
---

## Overview

pgjdbc, the PostgreSQL JDBC Driver, misreads some quoted text in its query parser. A `}` inside a literal ends a JDBC escape such as `{ts}`, and the rest of the literal is translated as SQL. A dollar quote whose tag has a non-ASCII symbol or space is not recognized. An `E''` string with a doubled quote is scanned as a standard string. `{fn right}` and `{fn timestampdiff}` with a negative argument produce a `--` comment. In each case text that the application quoted correctly can run as SQL with the privileges of the application's database role. All versions before 42.7.15 are affected, and 42.7.15 fixes the problem.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
