Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

pgjdbc Simple Query Mode SQL Injection (CVE-2026-134842)

CVE-2026-134842 is an SQL injection flaw in pgjdbc, the PostgreSQL JDBC driver for Java applications.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-134842
Vendor
pgjdbc
Affected Product
PostgreSQL JDBC Driver (org.postgresql:postgresql)
Exploitation
Not confirmed
Published
2026-11-23

CVE-2026-134842 is an SQL injection flaw in pgjdbc, the PostgreSQL JDBC driver for Java applications. With preferQueryMode=simple, the driver can quote a string parameter using an outdated view of standard_conforming_strings. An attacker who controls that parameter may then run SQL with the application's database privileges.pgjdbc published its advisory on 23 November 2026 and fixed the flaw in 42.7.15. The simple query mode is not the default. Exposure depends on the application configuration and a server or session setting described below.

What it allows

How Can CVE-2026-134842 Run Unintended SQL?

In simple query mode, pgjdbc writes parameter values into SQL query text. It can reuse a view of standard_conforming_strings after an earlier statement, trigger, or configuration reload changes the setting. When the setting is off, the driver's quoting can allow controlled parameter text to be interpreted as SQL.

The advisory also describes a cached parse made under the other setting. That can change whether a placeholder is treated as inside or outside a string literal. A separate encoding case involves allowEncodingChanges=true with EUC_JP or SJIS; the vendor also names PGConnection.escapeLiteral.

According to pgjdbc, an attacker must control a string parameter, the application must use preferQueryMode=simple, and standard_conforming_strings must be off on the server or during the session. The encoding case additionally needs the setting and encodings named above. Successful injection runs with the application's database role, so database permissions shape the potential impact.

Brandefense Blackhole counted one dark-chat item mentioning CVE-2026-134842 between 25 August and 23 November 2026. The measured unit is a mentioning chat item, not a verified incident or affected deployment. This observation does not establish active exploitation.

CISA KEV catalog version 2026.11.23 did not list this CVE. For triage, record the affected application, resolved driver version, query mode, and session setting in a vulnerability intelligence platform workflow. This is our defensive application of the vendor's conditions.

Who is affected

Which pgjdbc Versions and Configurations Are Affected?

The pgjdbc advisory lists versions through 42.7.14 as affected and 42.7.15 as patched. NVD describes all versions before 42.7.15 as affected. The advisory does not give a lower version boundary suitable for an automated branch range, so verify the resolved driver version manually.

Check the deployed org.postgresql:postgresql dependency, not only the build declaration. Determine whether any connection uses preferQueryMode=simple and whether standard_conforming_strings can be off on the server or within a session. Before 42.7.6, the vendor says any session with that setting off was affected.

For the encoding case, also review allowEncodingChanges=true with EUC_JP or SJIS client encoding. Include calls to PGConnection.escapeLiteral in the application review. These checks follow the vendor's described paths and can support vulnerability prioritization across Java services.

Upgrade to 42.7.15, then confirm the fixed driver is present in the running application's resolved dependencies. Recheck the connection settings and relevant query paths after deployment. Save the result in the patch management record.

Timeline

  1. 2026-11-23

    pgjdbc published GHSA-6rxc-3r4p-gpff and identified 42.7.15 as the fixed release.

  2. 2026-11-23

    NVD published the CVE record with a CVSS 3.1 score of 8.1.

What to do

  1. Find deployed pgjdbc versions

    Inventory Java applications with the org.postgresql:postgresql dependency. Inspect resolved dependencies in deployed artifacts and identify versions before 42.7.15.

  2. Review the exposure conditions

    Check preferQueryMode=simple and whether standard_conforming_strings can be off on the server or during a session. Review the vendor's additional encoding and PGConnection.escapeLiteral paths.

  3. Update and verify the driver

    Upgrade affected applications to pgjdbc 42.7.15. Confirm the running artifact resolves that version and test the application's affected database operations.

  4. Review database activity

    Prioritize applications that accept untrusted string parameters in simple query mode. Examine application and database logs for unexpected query behavior; this is our defensive review step, not a vendor detection signature.

What Brandefense can do

Frequently Asked Questions

Is pgjdbc simple query mode enabled by default?

No. The pgjdbc advisory says preferQueryMode=simple is required for this flaw and is not the default query mode.

Which pgjdbc release fixes CVE-2026-134842?

pgjdbc lists 42.7.15 as the patched version. Confirm that the deployed Java application resolves this driver release after updating.

Does a vulnerable version alone prove an application is exploitable?

No. The vendor also requires simple query mode, a relevant standard_conforming_strings setting, and attacker control of a string parameter.

What privileges would injected SQL have?

The pgjdbc advisory says it would run as the application's database role. Review that role's permissions when prioritizing affected services.

Sources

  1. pgjdbc Simple Query Mode Quotes Parameters for the Wrong standard_conforming_strings Valuepgjdbc
  2. CVE-2026-134842 RecordNIST NVD
  3. Known Exploited Vulnerabilities CatalogCISA
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →