Vulnerability DatabaseCVE-2026-134843

CVE-2026-134843: 
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2026-134843 is a SQL injection vulnerability in pgjdbc (the PostgreSQL JDBC Driver) caused by improper handling of unchecked exceptions during statement execution. When an unchecked exception interrupts a request, the driver fails to close the connection, leaving part of a Bind message in the send buffer; subsequent uploaded bytes can then be interpreted by the server as a SQL command. All versions of org.postgresql:postgresql before 42.7.15 are affected, with the setBinaryStream() specific trigger present since version 42.6.0. The vulnerability was disclosed on November 23, 2026, with a fix available in version 42.7.15. It carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).

Technical details

The root cause is a combination of CWE-89 (SQL Injection) and CWE-755 (Improper Handling of Exceptional Conditions). The driver correctly closes the connection after an IOException, but does not do so after an unchecked exception (e.g., NullPointerException). This leaves a partial Bind message in the TCP send buffer; the PostgreSQL server then reads the bytes that follow — which may be attacker-controlled data from a subsequent upload on the same connection — as a continuation of the Bind message or as a new Query message, effectively executing them as SQL. Three specific triggers exist: (1) since 42.6.0, calling setBinaryStream() without a length on a value over 51,200 bytes and re-executing the statement throws a NullPointerException mid-Bind; (2) the driver's own internal retry logic after SQLState 0A000 or 26000 (triggered by DDL changes) can cause the same desynchronization; and (3) in all versions, any application InputStream that throws an unchecked exception produces the same effect (GitHub Advisory).

Impact

A successful exploit allows an authenticated attacker who controls the content of an uploaded value to execute arbitrary SQL commands as the application's database role. This can result in full confidentiality loss (data exfiltration), integrity loss (data modification or deletion), and availability impact (database disruption), all rated High in the CVSS scoring. Depending on the database role's privileges, an attacker could escalate to operating system-level access via PostgreSQL extensions such as COPY TO/FROM PROGRAM or pg_read_file (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires low privileges (authenticated database access) and high attack complexity, as the attacker must first trigger a specific connection desynchronization condition (stream failure or retry scenario) and control the content of a subsequently uploaded value (GitHub Advisory, Feedly).

Exploitation steps

  1. Gain authenticated access: Obtain low-privilege credentials to a PostgreSQL database accessed via a vulnerable pgjdbc driver (any version < 42.7.15).
  2. Trigger connection desynchronization: Cause an unchecked exception mid-Bind using one of the following methods:
    • Upload a binary stream value via setBinaryStream() without a length argument, exceeding 51,200 bytes, and re-execute the prepared statement (triggers NullPointerException since 42.6.0).
    • Trigger a DDL change that causes the driver to retry after SQLState 0A000 or 26000.
    • Supply an application InputStream that throws an unchecked exception during parameter binding.
  3. Craft a malicious subsequent upload: On the same database connection (which remains open despite the exception), upload a value whose byte content is crafted to form a valid PostgreSQL Query message (e.g., a SELECT, INSERT, COPY, or DROP statement).
  4. Server executes injected SQL: The PostgreSQL server reads the trailing bytes from the send buffer as a new Query message and executes the embedded SQL command as the application's database role.
  5. Achieve objective: Depending on role privileges, exfiltrate data, modify records, drop tables, or escalate to OS-level command execution via COPY TO PROGRAM (GitHub Advisory).

Indicators of compromise

  • Logs: PostgreSQL server logs showing unexpected or malformed Query messages immediately following a Bind/Execute sequence on the same connection; queries executed under the application role that do not match expected application behavior.
  • Network: Unusual or repeated connection reuse patterns on the PostgreSQL port (default 5432) where a single session executes structurally inconsistent SQL commands; large binary payloads followed by unexpected SQL-like traffic on the same TCP stream.
  • Application Logs: Java stack traces containing NullPointerException originating from pgjdbc's setBinaryStream() or retry logic (SQLState 0A000/26000) without subsequent connection closure.
  • Database Activity: Unexpected DDL operations (e.g., DROP, CREATE, ALTER) or data exfiltration queries (COPY TO, SELECT on sensitive tables) executed under the application service account without corresponding application-level audit entries (GitHub Advisory).

Mitigation and workarounds

Upgrade org.postgresql:postgresql to version 42.7.15 or later, which closes the connection after any unchecked exception to prevent buffer desynchronization. No official configuration-based workaround is provided; however, as a temporary measure, applications can avoid using setBinaryStream() without a length argument on large values (>51,200 bytes) and ensure all InputStream implementations do not throw unchecked exceptions. Organizations should prioritize patching any application that uses pgjdbc with binary stream uploads or that may trigger driver-level retries via DDL changes (GitHub Advisory, pgjdbc Release).

Community reactions

The vulnerability was assigned by PostgreSQL and published via the pgjdbc GitHub Security Advisory by maintainer sehrope on November 23, 2026. No notable independent researcher commentary or significant media coverage has been identified beyond standard vulnerability aggregator indexing (VulDB, CVEFeed, Cloudflare Radar) as of the disclosure date (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

libpgjava

Affected

sid

libpgjava: 42.7.15-1

Fixed

trixie

libpgjava

Affected

Source: This report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-134844HIGH7.5
  • Linux Debian logoLinux Debian
  • libpgjava
NoNoNov 23, 2026
CVE-2026-134843HIGH7.5
  • Linux Debian logoLinux Debian
  • libpgjava
NoNoNov 23, 2026
CVE-2026-134845HIGH7.4
  • Linux Debian logoLinux Debian
  • libpgjava
NoNoNov 23, 2026
CVE-2026-134847MEDIUM6.5
  • Linux Debian logoLinux Debian
  • libpgjava
NoNoNov 23, 2026
CVE-2026-134846MEDIUM6.5
  • Linux Debian logoLinux Debian
  • libpgjava
NoNoNov 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management