pgjdbc parses quoted text as SQL in JDBC escapes, dollar quotes and E strings

Summary

CVECVE-2026-134841
StatePUBLISHED
AssignerPostgreSQL
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-23 17:17:49 UTC
Updated2026-11-23 17:17:49 UTC
Descriptionpgjdbc, 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.

Risk And Classification

Primary CVSS: v3.1 8.1 HIGH from f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Problem Types: CWE-89 | CWE-89 CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')


VersionSourceTypeScoreSeverityVector
3.1f86ef6dc-4d3a-42ad-8f28-e6d5547a5007Secondary8.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1CNADECLARED8.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Pgjdbc Pgjdbc affected 42.7.15 maven Not specified

References

ReferenceSourceLinkTags
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-4743-5rfh-f7mp f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Anthropic OSS Scanner (ANT-2026-F8ORRHGA) (en)

CNA: Anthropic OSS Scanner (ANT-2026-CSULRTN9) (en)

CNA: Anthropic OSS Scanner (ANT-2026-V49PY3LL) (en)

CNA: Anthropic OSS Scanner (ANT-2026-8HOO55D6) (en)

Additional Advisory Data

SourceTimeEvent
CNA2026-10-16T00:00:00.000ZReported by Anthropic OSS Scanner (ANT-2026-F8ORRHGA).
CNA2026-10-16T00:00:00.000ZReported by Anthropic OSS Scanner (ANT-2026-CSULRTN9).
CNA2026-10-16T00:00:00.000ZReported by Anthropic OSS Scanner (ANT-2026-V49PY3LL).
CNA2026-10-16T00:00:00.000ZReported by Anthropic OSS Scanner (ANT-2026-8HOO55D6).

Solutions

CNA: Upgrade to pgjdbc 42.7.15 or later.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report