Skip to main content

PostgreSQL JDBC Driver EUVDEUVD-2026-133247

| CVE-2026-134842 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
    Supply crafted string parameter to application
  2. Exploit
    Backslash-quote breaks out of SQL string literal
  3. Execution
    Remainder of value parsed as SQL in simple query mode
  4. Impact
    Execute arbitrary SQL as application database 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 the pgjdbc connection to use preferQueryMode=simple (this is NOT the default - the default extended query mode is unaffected) AND the server's standard_conforming_strings parameter to be off, either set at the server or turned off mid-session via a statement, trigger, or configuration reload; in that state a parameter value containing a backslash followed by a quote ends the literal and the rest runs as SQL. A separate path requires allowEncodingChanges=true together with the EUC_JP or Shift_JIS client encoding, where the yen sign (U+00A5) is encoded as 0x5C and acts as a backslash; PGConnection.escapeLiteral is affected the same way. The attacker must control a string parameter passed to the application. Limiting factors: the non-default simple query mode, the requirement that standard_conforming_strings be off (versions before 42.7.6 always quoted as if it were on, so any session with the setting off was affected; the statement cache can also reuse a parse made under the other setting), and for the encoding variant the specific charset and opt-in flag. All versions before 42.7.15 are affected; updating to 42.7.15 is the fix.

Impact

This is a genuine SQL injection (CWE-89) in pgjdbc, scored CVSS 8.1 with vector AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, meaning network-reachable, unauthenticated at the CVSS layer, but high attack complexity. The high-complexity rating is well justified by the evidence: exploitation is gated behind multiple non-default conditions (preferQueryMode=simple plus standard_conforming_strings being off, or the yen-sign path requiring allowEncodingChanges=true with EUC_JP/SJIS encoding), so this is not a fire-and-forget remote exploit against stock deployments. The vuln.today decision label is 'this_week' (not act_now/emergency), consistent with a serious but conditionally-exploitable flaw. It is NOT in CISA KEV and no EPSS score was supplied, so there is no signal of active or widespread exploitation; absence of EPSS/KEV should not be read as safety, only as missing data. A proof-of-concept is published directly in the GHSA advisory, so the technique is documented and reproducible even though no weaponized campaign is evidenced. Net: a real priority for any Java shop that runs pgjdbc in simple query mode or with the encoding options above, but lower practical urgency for the majority running default configurations. The PR:N rating reflects that the attacker only needs to control an application string parameter, not database credentials - verify your own deployment's query mode and standard_conforming_strings setting to place yourself on the risk curve.

Exploit ScenarioDerived

An attacker supplies a crafted string value (e.g. a form field or API parameter) to a Java application that uses pgjdbc with preferQueryMode=simple while standard_conforming_strings is off; a value containing a backslash and quote closes the intended string literal and the remainder executes as SQL under the application's database role. A working proof-of-concept is included in the GHSA advisory, demonstrating a SET LOCAL statement that flips the setting followed by a parameter that smuggles a subquery. High attack complexity (AC:H) applies because the non-default query mode and server/session setting must both be present.

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 (CWE-89) in the PostgreSQL JDBC Driver (pgjdbc) before 42.7.15 lets an attacker who controls a string parameter run arbitrary SQL as the application's database role when the connection uses the non-default preferQueryMode=simple and standard_conforming_strings is off on the server or is turned off mid-session. The driver inlines parameter values into the query text and escapes them based on its belief about that setting, so a value containing a backslash followed by a quote can terminate the literal and execute the remainder as SQL; a related path requires allowEncodingChanges=true with the EUC_JP or Shift_JIS client encoding, where the yen sign is encoded as 0x5C and behaves as a backslash, and PGConnection.escapeLiteral shares the flaw. Rated CVSS 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) - unauthenticated at the CVSS layer but high complexity because of the non-default configuration prerequisites; the vendor advisory includes a public PoC reference, which has not been independently verified as working exploit code, and no active exploitation is confirmed (no CISA KEV listing).

RemediationAI

Upgrade the pgjdbc driver to 42.7.15, the version named in the vendor advisory (https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-6rxc-3r4p-gpff); if a coordinated upgrade is not immediately possible, note that 42.7.6 and later already remove the always-vulnerable behavior and reduce but do not close the exposure. Where upgrading is delayed, the configuration prerequisites can be removed: stop using preferQueryMode=simple and rely on the default extended query mode, which binds parameters server-side instead of inlining them - the trade-off is changed driver behavior and possible incompatibility with applications that depend on simple mode for multi-statement batches or specific statement parsing. Ensure standard_conforming_strings remains on for the server and for the session and avoid workloads where statements, triggers or configuration reloads turn it off, accepting that legacy applications which depend on backslash-escaped string literals would need their SQL rewritten. Do not enable allowEncodingChanges=true, and avoid EUC_JP and Shift_JIS client encodings for connections that use pgjdbc - this closes the yen-sign path at the cost of restricting deployment to encodings the driver handles safely. Direct uses of PGConnection.escapeLiteral should be re-examined, since that helper shares the same quoting flaw and is not made safe by these settings alone.

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 is the PostgreSQL JDBC driver (Maven artifact org.postgresql:postgresql). In simple query mode the driver does not use server-side parameter binding for all statements: it writes parameter values directly into the SQL text, so correct quoting is the only thing separating data from code. That quoting depends on the session's standard_conforming_strings setting, which determines whether backslashes are escape characters inside string literals. When the driver believes the setting is on, it doubles single quotes and leaves backslashes untouched; if the setting is actually off, a value containing a backslash-quote sequence closes the literal early and the remaining text is parsed as SQL. The belief can be wrong because an earlier statement in the same query or batch, a trigger, or a configuration reload can disable the setting mid-session, and because the driver's statement cache can reuse a parse prepared under the opposite setting, leaving placeholders inside or outside literals. Before 42.7.6 the driver always quoted as though the setting were on, so every session running with it off was exposed. A second encoding-level complication exists: the JDK's EUC_JP and Shift_JIS charsets encode U+00A5 (yen) as 0x5C, which the PostgreSQL server reads as a backslash, so with allowEncodingChanges=true the yen sign reintroduces the same escape behavior; PGConnection.escapeLiteral was affected identically. The root cause class is improper neutralization of special elements used in an SQL command (CWE-89), arising from state-dependent escaping rather than a parsing bug in the server.

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

Attacker only controls an application string parameter (PR:N), but required non-default query mode and standard_conforming_strings-off state justify AC:H; SQL execution as the DB role yields full C/I/A impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/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, 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.

Technical POC Analysis

CWE-89 (improper neutralization of special elements 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 flaw in the PostgreSQL JDBC Driver (pgjdbc) affects applications that connect to PostgreSQL databases using non-default configurations, potentially allowing an attacker to execute arbitrary SQL under the application's database privileges and compromise data confidentiality, integrity, and availability. Leadership should care because any system running the affected driver with these specific settings exposes sensitive database contents and could undermine trust in core business applications and reporting. While exploitation requires uncommon configuration prerequisites, the breadth of Java applications bundling this driver warrants prompt inventory and remediation planning.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: enforce preferQueryMode=extended (default), ensure standard_conforming_strings is on across all servers, disable allowEncodingChanges and avoid EUC_JP/Shift_JIS client encodings, validate and parameterize untrusted input at the application layer, and least-privilege database roles.

Threat Intelligence Overview

Prevalence
High
pgjdbc is the standard PostgreSQL JDBC driver across Java enterprise deployments
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