# GHSA-3MRW-838H-X9J9: pgjdbc does not enforce TLS for some ssl, service and DataSource settings

- Database: GitHub
- Severity: CVSS 7.4 (High)
- Published: 2026-11-23
- Modified: 2026-11-23

## Tracked as

- [CVE-2026-134845](https://cve.now/CVE-2026-134845.md): pgjdbc TLS bypass in connection settings

## Affected versions

- org.postgresql:postgresql (Maven): through 42.7.14

## Description

### Summary

Some pgjdbc settings that ask for TLS with certificate checks connected with `sslmode=prefer` instead. An attacker on the network could then intercept the connection.


### Details

When `sslmode` is not set, only `ssl=true` or an empty `ssl` gave `verify-full`. Values such as `1`, `on`, `yes` or `verify-full` gave `prefer` from 42.2.5. From 9.4.1208 to 42.2.4 they gave no TLS at all.

A `service` given in the Properties of `getConnection()` was ignored without a warning. The `sslmode` of that `pg_service.conf` entry was lost.

`BaseDataSource.setUrl()` did not replace a property that was already set. A second `setUrl()`, or a setter followed by `setUrl()`, kept the earlier `sslmode`, `channelBinding` or `gssEncMode`.

### Proof of concept


```
jdbc:postgresql://db.example.com/app?ssl=on
// The driver uses sslmode=prefer. A network attacker can refuse TLS or present any certificate.
```


### Impact

An attacker on the network path can read and change the traffic of an affected connection. For some authentication methods this includes the password. The application must use one of the configurations above.

## References

- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-3mrw-838h-x9j9

Page: https://cve.now/GHSA-3MRW-838H-X9J9

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
