Skip to main content

PostgreSQL JDBC Driver CVE-2026-134841

| EUVDEUVD-2026-133246 HIGH
SQL Injection (CWE-89)
2026-11-23 f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
8.1
CVSS 3.1 · Vendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app that quotes user input into JDBC escape
  2. Delivery
    Craft value with '}' or dollar-tag/E'' bypass
  3. Exploit
    pgjdbc parser mistranslates literal as SQL
  4. Execution
    Injected UNION/statement executes on server
  5. Impact
    Read or modify data as application's DB role

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the application place attacker-controlled text into one of the specific mis-parsed contexts the advisory names: inside a JDBC escape ({d}, {t}, {ts}, {oj}, {escape}) where a '}' in the literal prematurely ends the escape; inside a dollar-quoted string whose tag contains a non-ASCII symbol or space (e.g. U+00A7), which the parser fails to recognize; inside an E'' string with a doubled quote followed by \'; or following a negative argument to {fn right(...)} or {fn timestampdiff(...)}, which emits a '--' comment. Escape processing is ON by default, so the escape and {fn} variants apply to default configurations. Limiting factors: the attacker must control a value that the app routes into one of these quoting constructs, and the E'' parameter-value variant additionally requires the non-default setting preferQueryMode=simple. No authentication to the application layer is implied by the vector (PR:N); the injected SQL runs with the privileges of the application's database role. Only complete fix per vendor is upgrading to 42.7.15.

Impact

This is a genuine high-priority SQL injection (CWE-89) in pgjdbc, the near-ubiquitous PostgreSQL JDBC driver, rated CVSS 8.1 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H). The vector shows a network-reachable, unauthenticated (PR:N) flaw with full C/I/A impact, tempered only by AC:H - exploitation is not fully generic because the attacker-controlled value must land in a specific parsing context (a JDBC escape like {ts}, a dollar-quote with a non-ASCII/space tag, or an E'' string), which the driver mishandles. The vuln.today decision label is 'this_week', consistent with a serious but not emergency issue. Key signals are mixed/absent: there is no CISA KEV listing and no EPSS score in the provided data, so there is no evidence of active exploitation or a modeled exploitation probability. A concrete proof-of-concept is published in the GHSA advisory itself, which materially raises practical risk because the bypass technique is fully documented. Net: real priority driven by product ubiquity, a published PoC, and the fact that escape processing is on by default - not a paper-high CVSS. Note AC:H reflects the need for a specific quoting context (and, for the E'' parameter variant, non-default preferQueryMode=simple), not a timing or race condition; the advisory describes deterministic parser confusion, not an attacker-uncontrolled trigger.

Exploit ScenarioDerived

An application safely doubles single quotes (per common escaping) and interpolates attacker-controlled input into a query that uses a JDBC escape such as {ts '...'}. The attacker supplies a value containing a '}' plus a UNION SELECT (as shown in the advisory PoC), so the driver prematurely ends the escape and treats the remainder of the literal as SQL, exfiltrating data like API keys with the application's database privileges. A working proof-of-concept is published in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 23, 2026

SQL injection in pgjdbc (the PostgreSQL JDBC Driver) before 42.7.15 lets an attacker who controls a value that the application quotes have that text executed as SQL with the privileges of the application's database role. The flaw is in the driver's client-side query parser, which mishandles a '}' inside a literal within JDBC escapes ({d}, {t}, {ts}, {oj}, {escape}), fails to recognize dollar quotes whose tag contains a non-ASCII symbol or space, mis-scans E'' strings containing a doubled quote, and emits a '--' comment when {fn right} or {fn timestampdiff} receives a negative argument. Escape processing is enabled by default, so the escape and {fn} variants affect default configurations, while the E'' parameter-value variant additionally requires preferQueryMode=simple; the advisory includes a proof-of-concept snippet, but no confirmed public exploit code and no CISA KEV entry were identified at time of analysis.

RemediationAI

Upgrade the PostgreSQL JDBC Driver to 42.7.15, which the vendor identifies as the only complete fix for all of the mis-parsing paths described in advisory GHSA-4743-5rfh-f7mp (https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-4743-5rfh-f7mp). Note that 42.7.15 must be pulled explicitly in build files and dependency-management sections (Maven/Gradle or equivalent), because the vulnerable range <=42.7.14 is inherited by transitive dependencies and many application servers bundle an older driver in their lib directory that must be replaced separately. Until the upgrade can be deployed, reducing exposure is partial at best: keeping the driver in its default extended query mode rather than setting preferQueryMode=simple removes the E''-with-parameters variant, and avoiding the placement of attacker-controlled text inside JDBC escapes, into dollar-quoted literals with non-ASCII or spaced tags, into E'' strings, or as arguments to {fn right}/{fn timestampdiff} avoids the remaining paths, but none of these substitutes for installing 42.7.15 since escape processing is enabled by default and the underlying parser defect remains.

Affected VersionsENISA

pgjdbc 0 <42.7.15

Affected Packages

euvd pgjdbc fix: 42.7.15

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pgjdbc performs its own lightweight parsing of SQL statements before sending them to the server, in order to rewrite JDBC escape sequences such as {ts '...'}, {d '...'}, {t '...'}, {oj ...} and {escape ...}, to locate parameter placeholders, and to split multi-statement strings. That parser is where the quoting model diverges from PostgreSQL's: it treats a '}' inside a string literal, quoted identifier, dollar quote or comment as the end of the enclosing JDBC escape, after which the remaining literal text is translated and forwarded as SQL. It also fails to enter dollar-quote state when the tag contains a non-ASCII symbol (for example U+00A7) or a space, so placeholders and statement breaks are detected inside text the server would treat as quoted, and escape processing can itself synthesize a closing tag. In E'' strings, a doubled quote causes the driver to fall back to standard-string scanning, so a later \' terminates the string for the driver but not for the server. The {fn right(a, b)} and {fn timestampdiff(t, b, c)} rewrites prefix an argument with a minus sign, so a negative argument yields '--' and comments out the remainder of the line, allowing text after the next newline to execute. All of these are instances of CWE-89: attacker-influenced text that the application correctly quoted is reinterpreted as SQL, executing under the application's database role. The E'' case affecting parameter values requires preferQueryMode=simple; the other variants apply with default escape processing.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007) PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

Network-reachable and unauthenticated (AV:N/PR:N); AC:H because the input must reach a specific mis-parsed quoting context (and one variant needs non-default simple mode); full SQL execution yields C:H/I:H/A:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007).

CVSS VectorVendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

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

Lifecycle Timeline

2
Patch available
Nov 23, 2026 - 18:02 EUVD
CVE Published
Nov 23, 2026 - 17:17 cve.org
HIGH 8.1

DescriptionCVE.org

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.

Technical POC Analysis

CWE-89 (Improper Neutralization of Special Elements used in an SQL Command).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity SQL injection vulnerability in the PostgreSQL JDBC Driver (pgjdbc) before version 42.7.15 could allow an attacker who controls certain input values to execute arbitrary SQL commands under the application's database privileges. This affects all applications using the default driver configuration, potentially exposing sensitive data and enabling unauthorized database operations. Leadership should prioritize remediation to prevent data breaches and maintain compliance.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: disable JDBC escape processing (set 'enableEscapeProcessing=false' in connection properties) and avoid using preferQueryMode=simple; ensure strict input validation and least-privilege database roles.

Threat Intelligence Overview

Prevalence
High
pgjdbc is the standard JDBC driver for Java apps using PostgreSQL
Data Quality
4 sources
Confidence: Medium
EUVD NVD CVE.org Vulnrichment GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy