# GHSA-HCJC-54FP-2P42: pgjdbc GSS encryption accepts replayed packets and can stop encrypting

- Database: GitHub
- Severity: CVSS 6.5 (Medium)
- Published: 2026-11-23
- Modified: 2026-11-23

## Tracked as

- [CVE-2026-134846](https://cve.now/CVE-2026-134846.md): pgjdbc auth bypass in GSS encryption

## Affected versions

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

## Description

### Summary

With GSS encryption, pgjdbc accepted server packets that were replayed or out of order. An integrity-only server packet also turned off encryption for the packets the driver sent after it.


### Details

`GSSContext.unwrap()` reports a duplicate, old, out-of-sequence or gap token in the `MessageProp`. It does not fail. The driver did not check these flags. An attacker on the network could drop a server reply and deliver an earlier one from the same connection.

The driver shared one `MessageProp` between reading and writing. An incoming token without privacy cleared the privacy flag, and later outgoing packets were signed but not encrypted. Only a party with the session key, such as the server, can create such a token.

### Proof of concept

A malicious backend that sends messages to the driver like this:

```
backend to client: [length][sealed token T] [length][sealed token T]
// The driver delivers both copies of T to the protocol parser.
```


### Impact

A network attacker can make the driver accept an earlier server reply as the answer to the current query. A server that sends one integrity-only packet makes the driver send later SQL and parameters readable on the network. This needs `gssEncMode=prefer` or `require` and a server that accepts GSS encryption. The default since 42.2.18 is `allow`, which does not start GSS encryption.

## References

- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-hcjc-54fp-2p42

Page: https://cve.now/GHSA-HCJC-54FP-2P42

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