CVE-2026-134845: 
Java analisi e mitigazione delle vulnerabilità

Panoramica

CVE-2026-134845 is a TLS enforcement flaw in pgjdbc, the PostgreSQL JDBC Driver, that allows network-positioned attackers to intercept and modify database traffic. The vulnerability stems from multiple misconfigurations where TLS is not properly enforced despite settings that request it: SSL values like 1, on, yes, or verify-full result in sslmode=prefer (or no TLS at all in older versions) rather than requiring encryption; service entries specified via Properties have their pg_service.conf sslmode silently ignored; and BaseDataSource.setUrl() retains previously set sslmode, channelBinding, or gssEncMode values. Affected versions span 9.4.1208 through 42.7.14 (Maven artifact org.postgresql:postgresql), and version 42.7.15 resolves the issue. It carries a CVSS v3.1 base score of 7.4 (High) (GitHub Advisory).

Dettagli tecnici

The root cause is classified under CWE-295 (Improper Certificate Validation) and CWE-319 (Cleartext Transmission of Sensitive Information). Three distinct code paths contribute to the flaw: (1) when sslmode is absent, SSL shorthand values (1, on, yes, verify-full) resolve to sslmode=prefer from version 42.2.5 onward, or to no TLS at all in versions 9.4.1208–42.2.4; (2) a PostgreSQL service name passed via Properties to getConnection() is silently ignored, discarding the sslmode from the corresponding pg_service.conf entry; and (3) BaseDataSource.setUrl() does not overwrite properties already set, so a prior sslmode, channelBinding, or gssEncMode persists even after a new URL is supplied. A proof-of-concept connection string demonstrating the issue is jdbc:postgresql://db.example.com/app?ssl=on, which causes the driver to use sslmode=prefer, allowing a network attacker to refuse TLS or present an arbitrary certificate (GitHub Advisory).

Impatto

An unauthenticated attacker positioned on the network path between a Java application and its PostgreSQL server can intercept all database traffic in cleartext, including credentials (for some authentication methods), SQL queries, and query results, and can also modify commands and responses in transit. Both confidentiality and integrity are rated High, while availability is unaffected. The scope of impact is limited to connections using one of the misconfigured SSL settings, but given the breadth of affected versions (spanning over a decade of releases), the potential exposure across enterprise environments is significant (GitHub Advisory).

Sfruttabilità

No public proof-of-concept exploit code or in-the-wild exploitation has been confirmed as of the disclosure date, though the GitHub Advisory includes a PoC connection string illustrating the misconfiguration. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires an attacker to be positioned on the network path (man-in-the-middle), making it a High attack complexity scenario that is not automatable (GitHub Advisory).

Fasi di sfruttamento

  1. Reconnaissance: Identify Java applications using pgjdbc versions 9.4.1208–42.7.14 that connect to PostgreSQL, particularly those using connection strings with ssl=on, ssl=yes, ssl=1, or ssl=verify-full without an explicit sslmode parameter.
  2. Network Positioning: Gain a man-in-the-middle position on the network path between the application server and the PostgreSQL database server (e.g., via ARP spoofing, rogue Wi-Fi, or compromised network infrastructure).
  3. TLS Downgrade: Because the driver uses sslmode=prefer, intercept the initial connection handshake and refuse the TLS upgrade. The driver will fall back to an unencrypted connection without alerting the application.
  4. Traffic Interception: Capture the now-plaintext PostgreSQL wire protocol traffic to read credentials, SQL queries, and database responses.
  5. Traffic Modification (optional): Inject or alter SQL commands or server responses in transit to manipulate application behavior or exfiltrate additional data (GitHub Advisory).

Indicatori di compromissione

  • Network: Unexpected unencrypted PostgreSQL wire protocol traffic (TCP port 5432) on network segments where TLS-encrypted connections are expected; TLS negotiation failures or downgrades observed in network captures between application and database servers.
  • Logs: PostgreSQL server logs showing connections established without SSL (ssl=off) from clients that are configured to request SSL; application logs lacking TLS handshake confirmation messages.
  • Process/Configuration: Connection strings in application configuration files using ssl=on, ssl=yes, ssl=1, or ssl=verify-full without an explicit sslmode=require or sslmode=verify-full parameter; use of pg_service.conf service names passed via Properties rather than the JDBC URL.

Mitigazione e soluzioni alternative

Upgrade org.postgresql:postgresql (pgjdbc) to version 42.7.15 or later, which is the official fix (GitHub Advisory). As interim mitigations: (1) explicitly set sslmode=require or sslmode=verify-full in JDBC connection URLs rather than relying on the ssl shorthand parameter; (2) pass sslmode directly in the JDBC URL rather than via pg_service.conf service entries in Properties; (3) audit any code using BaseDataSource.setUrl() to ensure TLS-related properties are not inadvertently retained from prior configurations; and (4) implement network segmentation and monitoring to detect unencrypted database connections or anomalous traffic on database network paths.

Risorse aggiuntive

Stato delle patch per la distribuzione Linux

Disponibilità delle patch per le principali distribuzioni Linux e relative versioni.

Debian

Risolto

bookworm

libpgjava

Interessato

sid

libpgjava: 42.7.15-1

Risolto

trixie

libpgjava

Interessato

Ubuntu

Sconosciuto

bionic (esm-apps)

libpgjava

Sconosciuto

devel

libpgjava

Sconosciuto

focal (esm-apps)

libpgjava

Sconosciuto

jammy

libpgjava

Sconosciuto

jammy (esm-apps)

libpgjava

Sconosciuto

noble

libpgjava

Sconosciuto

noble (esm-apps)

libpgjava

Sconosciuto

resolute

libpgjava

Sconosciuto

RHEL / CentOS

Interessato

RHEL 9

Non interessato

RHEL 10

Non interessato

Fonte: Questo report è stato generato tramite IA

Vulnerabilità correlate di Java:

CVE ID

Gravità

Punteggio

Tecnologie

Nome del componente

Exploit CISA KEV

Dispone di patch

Data di pubblicazione

CVE-2026-134844HIGH7.5
  • Java logoJava
  • flyway
NoSìNov 23, 2026
CVE-2026-134848HIGH7.4
  • Java logoJava
  • org.postgresql:postgresql
NoSìNov 23, 2026
CVE-2026-134845HIGH7.4
  • Java logoJava
  • flyway
NoSìNov 23, 2026
CVE-2026-134847MEDIUM6.5
  • Java logoJava
  • flyway
NoSìNov 23, 2026
CVE-2026-134846MEDIUM6.5
  • Java logoJava
  • keycloak-26.8
NoSìNov 23, 2026

Valutazione gratuita delle vulnerabilità

Valuta la tua postura di sicurezza del cloud

Valuta le tue pratiche di sicurezza del cloud in 9 domini di sicurezza per stabilire un benchmark del tuo livello di rischio e identificare le lacune nelle tue difese.

Richiedi valutazione

Ulteriori risorse Wiz

Richiedi una demo personalizzata

Pronti a vedere Wiz in azione?

"La migliore esperienza utente che abbia mai visto offre piena visibilità ai carichi di lavoro cloud."
David EstlickCISO (CISO)
"Wiz fornisce un unico pannello di controllo per vedere cosa sta succedendo nei nostri ambienti cloud."
Adam FletcherResponsabile della sicurezza
"Sappiamo che se Wiz identifica qualcosa come critico, in realtà lo è."
Greg PoniatowskiResponsabile della gestione delle minacce e delle vulnerabilità