---
id: CVE-2026-134842
title: >-
  pgjdbc, the PostgreSQL JDBC Driver, can quote a string parameter for the wrong
  value of standard_conforming_strings when preferQueryMode=simple is set
summary: >-
  pgjdbc, the PostgreSQL JDBC Driver, can quote a string parameter for the wrong
  value of standard_conforming_strings when preferQueryMode=simple is set. A
  statement, trigger or configuration reload can turn the setting off during a
  sessio…
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-134842'
references:
  - url: 'https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-6rxc-3r4p-gpff'
    label: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
  - url: 'https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-6rxc-3r4p-gpff'
    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:34:07.012419Z'
ingestedAt: '2026-11-23T20:35:33.366Z'
epss: 0.00421
epssPercentile: 0.36916
---

## Overview

pgjdbc, the PostgreSQL JDBC Driver, can quote a string parameter for the wrong value of standard_conforming_strings when preferQueryMode=simple is set. A statement, trigger or configuration reload can turn the setting off during a session. A parameter value with a backslash and a quote then ends the literal, and the rest of the value runs as SQL. Before 42.7.6 any session with the setting off was affected. The statement cache can also reuse a parse made under the other setting. With allowEncodingChanges=true and the EUC_JP or SJIS client encoding, the yen sign acts as a backslash. 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.
