You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pgjdbc is vulnerable to a client-side denial of service during SCRAM-SHA-256 authentication.
Impact
A malicious server can instruct the driver to perform SCRAM authentication with a very large iteration count.
With a large enough value, the client spends an unbounded amount of CPU time inside PBKDF2 before authentication can fail.
A single attempt ties up a CPU core. Repeated or concurrent attempts exhaust client CPU and can wedge connection pools.
In affected versions, loginTimeout did not fully mitigate this problem. When loginTimeout expired, the caller could stop waiting, but the worker thread performing the connection attempt could continue running and burning CPU inside the SCRAM PBKDF2 computation.
This issue affects availability. It does not provide authentication bypass, privilege escalation, or direct password disclosure.
A user is vulnerable when all of the following are true:
The connection uses SCRAM-SHA-256 authentication.
The client reaches a malicious, compromised, or attacker-controlled PostgreSQL endpoint.
That endpoint sends a very large SCRAM PBKDF2 iteration count in the server-first-message.
In practice, that can happen in these situations:
the application lets end users or tenants supply their own database connection details (as in many BI, reporting, analytics, ETL, and low-code platforms), so a user can point the shared client host at a server they control
the application accepts connection strings, hostnames, or JDBC URLs from user input, configuration uploaded by users, or other untrusted sources
the application is configured to connect to a PostgreSQL server that is itself malicious or later becomes compromised
the application connects through an untrusted proxy, relay, tunnel, bastion, or connection-pooling service that can act as the PostgreSQL server
an attacker can redirect the client to a fake PostgreSQL endpoint by manipulating DNS, service discovery, Kubernetes service resolution, /etc/hosts, environment variables, or similar indirection
an active network attacker on the path can impersonate the server because the connection does not strongly verify server identity (for example, sslmode lower than verify-full, or trusting a CA that signs hosts outside the operator's control)
The issue is more damaging when the application uses connection retries, many parallel connection attempts, or loginTimeout and assumes the timeout fully stops the work.
Patches
The patch introduces a new connection property, scramMaxIterations, with a default of 100K. The client now rejects SCRAM server messages that advertise more PBKDF2 iterations than the configured cap before starting the PBKDF2 computation begins.
Workarounds
Until a patched version of pgjdbc is deployed, the following measures reduce exposure:
Only connect to trusted PostgreSQL servers whose identity is verified.
Connect only to trusted PostgreSQL servers, and verify server identity with TLS using sslmode=verify-full and a trusted CA.
TLS without certificate and hostname verification is not sufficient as an active network attacker can still impersonate the server.
Do not rely on loginTimeout as a complete mitigation on unpatched versions.
On affected versions, loginTimeout can stop the waiting caller while the worker thread continues spending CPU.
Avoid SCRAM on untrusted or interceptable connection paths.
For those paths, use an authentication method that does not let the server choose a SCRAM PBKDF2 iteration count.
Reduce blast radius operationally.
Limit parallel connection attempts, add retry backoff, isolate connection establishment in a separate worker or process when possible, and apply CPU or container limits where appropriate.
On trusted servers you control, keep SCRAM iteration counts at ordinary values.
This does not defend against an attacker-controlled server, but it avoids unnecessary client cost when talking to legitimate servers.
channelBinding=require connections can be silently downgraded from SCRAM-SHA-256-PLUS (with channel binding) to plain SCRAM-SHA-256 (without it), losing the man-in-the-middle protection the setting is meant to guarantee. An attacker who can intercept the TLS connection triggers the downgrade with a certificate whose signature algorithm has no tls-server-end-point channel-binding hash. Examples are Ed25519, Ed448, and post-quantum algorithms.
Two issues combine in releases 42.7.4 through 42.7.11:
The bundled com.ongres.scram:scram-client (3.1 or 3.2) returns an empty byte array instead of failing when it cannot derive the binding hash for such a certificate. This is the library issue tracked as GHSA-p9jg-fcr6-3mhf.
pgJDBC does not enforce channelBinding=require where it matters. ScramAuthenticator checks only that the server advertised a -PLUS mechanism; it neither rejects the empty binding nor checks that the negotiated mechanism uses channel binding. The connection therefore downgrades silently, and would do so even against a fixed scram-client, because the missing enforcement is in pgJDBC's own code.
Only connections that set channelBinding=require are affected. Under the default prefer policy, and under allow or disable, falling back to plain SCRAM is the documented behaviour. Releases before 42.7.4 are unaffected, because they do not support channel binding.
Patches
Fixed in pgJDBC 42.7.12. pgJDBC now enforces channel binding in its own code, independently of the scram-client version:
Under channelBinding=require, it fails the connection when no channel-binding data can be extracted from the server certificate, instead of passing an empty value to the SCRAM client. The error names the certificate signature algorithm.
After negotiation, it requires the selected mechanism to use channel binding (a -PLUS mechanism) whenever channelBinding=require is set, regardless of how negotiation resolved.
Upgrade to 42.7.12 or later.
Workarounds
No pgJDBC setting restores channel-binding enforcement on an affected release; upgrading is the fix.
If you cannot upgrade immediately, verify the server certificate at the TLS layer so that a man-in-the-middle cannot present a substitute certificate. Set sslmode=verify-full with a truststore that contains only your server's CA. This defence is independent of channel binding and blocks the same attacker. Connections that rely on channelBinding=require in place of certificate verification have no equivalent workaround and should upgrade.
References
GHSA-p9jg-fcr6-3mhf — the related com.ongres.scram:scram-client issue (root cause of the empty channel-binding value).
fix: Enforce SCRAM channel-binding policy and prevent silent downgrade.
Under channelBinding=require, the driver silently downgraded from SCRAM-SHA-256-PLUS (with channel binding) to plain SCRAM-SHA-256 (without it) when the server presented a certificate whose signature algorithm has no tls-server-end-point channel-binding hash (e.g. Ed25519, Ed448, or post-quantum algorithms). An attacker who can intercept the TLS connection could exploit this to strip channel-binding protection.
The fix enforces channel binding in the driver's own code: it now fails the connection when no binding data can be extracted, and verifies the negotiated mechanism uses channel binding (-PLUS) when require is set.
Only connections that set channelBinding=require are affected. The default prefer policy and releases before 42.7.4 (which introduced channel-binding support) are unaffected.
See the Security Advisory for more detail.
The following CVE-2026-54291 has been issued.
fix: Limit SCRAM PBKDF2 iterations accepted from the server.
pgjdbc was vulnerable to a client-side denial of service in SCRAM-SHA-256 authentication, where a malicious or compromised PostgreSQL server could specify an extremely large PBKDF2 iteration count, causing the client to consume unbounded CPU and potentially exhaust connection pools. The fix introduces a new scramMaxIterations connection property (defaulting to 100,000) to cap iteration counts before computation begins.
See the Security Advisory for more detail.
The following CVE-2026-42198 has been issued.
This PR upgrades the PostgreSQL JDBC driver from 42.7.10 to 42.7.11 to patch CVE-2026-42198, a high-severity DoS vulnerability in the SCRAM-SHA-256 authentication mechanism. The fix introduces a scramMaxIterations property defaulting to 100K to cap PBKDF2 iterations. The dependency bump is minimal (patch version), and the PR body provides comprehensive security advisory details. No issues found.
Review Statistics
Category
Count
Critical Issues
0
Warnings
0
Suggestions
0
Files Reviewed
1
Critical Issues
Issues that MUST be addressed before merging (security, bugs, breaking changes)
None
Warnings
Issues that SHOULD be addressed but are not blocking
None
Suggestions
Recommendations for improvement (nice to have)
None
Positive Feedback
Excellent PR description with full CVE details, impact assessment, CVSS score (7.5/10 High), and workarounds clearly documented in the body.
Dependency bump is minimal (patch version), reducing the risk of transitive breakage.
Auto-merge is enabled, allowing the security fix to land quickly.
Version upgrade follows existing pattern: dependency 'org.postgresql:postgresql:42.7.10' → dependency 'org.postgresql:postgresql:42.7.11' in source/build.gradle.
ℹ️ About this review
This review was automatically generated using the run-actions workflow.
alaudaa-renovateBot
changed the title
fix(deps): update dependency org.postgresql:postgresql to v42.7.11 [security] (alauda-2025.1.0)
fix(deps): update dependency org.postgresql:postgresql to v42.7.12 [security] (alauda-2025.1.0)
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
42.7.10->42.7.12Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
pgjdbc: Unbounded PBKDF2 iterations in SCRAM authentication allows CPU exhaustion DoS
BIT-postgresql-jdbc-driver-2026-42198 / CVE-2026-42198 / GHSA-98qh-xjc8-98pq
More information
Details
Summary
pgjdbc is vulnerable to a client-side denial of service during SCRAM-SHA-256 authentication.
Impact
A malicious server can instruct the driver to perform SCRAM authentication with a very large iteration count.
With a large enough value, the client spends an unbounded amount of CPU time inside PBKDF2 before authentication can fail.
A single attempt ties up a CPU core. Repeated or concurrent attempts exhaust client CPU and can wedge connection pools.
In affected versions,
loginTimeoutdid not fully mitigate this problem. WhenloginTimeoutexpired, the caller could stop waiting, but the worker thread performing the connection attempt could continue running and burning CPU inside the SCRAM PBKDF2 computation.This issue affects availability. It does not provide authentication bypass, privilege escalation, or direct password disclosure.
A user is vulnerable when all of the following are true:
server-first-message.In practice, that can happen in these situations:
/etc/hosts, environment variables, or similar indirectionsslmodelower thanverify-full, or trusting a CA that signs hosts outside the operator's control)The issue is more damaging when the application uses connection retries, many parallel connection attempts, or
loginTimeoutand assumes the timeout fully stops the work.Patches
The patch introduces a new connection property,
scramMaxIterations, with a default of 100K. The client now rejects SCRAM server messages that advertise more PBKDF2 iterations than the configured cap before starting the PBKDF2 computation begins.Workarounds
Until a patched version of pgjdbc is deployed, the following measures reduce exposure:
Only connect to trusted PostgreSQL servers whose identity is verified.
Connect only to trusted PostgreSQL servers, and verify server identity with TLS using sslmode=verify-full and a trusted CA.
TLS without certificate and hostname verification is not sufficient as an active network attacker can still impersonate the server.
Do not rely on
loginTimeoutas a complete mitigation on unpatched versions.On affected versions,
loginTimeoutcan stop the waiting caller while the worker thread continues spending CPU.Avoid SCRAM on untrusted or interceptable connection paths.
For those paths, use an authentication method that does not let the server choose a SCRAM PBKDF2 iteration count.
Reduce blast radius operationally.
Limit parallel connection attempts, add retry backoff, isolate connection establishment in a separate worker or process when possible, and apply CPU or container limits where appropriate.
On trusted servers you control, keep SCRAM iteration counts at ordinary values.
This does not defend against an attacker-controlled server, but it avoids unnecessary client cost when talking to legitimate servers.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
PostgreSQL JDBC Driver: Silent channel-binding authentication downgrade via unsupported certificate algorithms
BIT-postgresql-jdbc-driver-2026-54291 / CVE-2026-54291 / GHSA-j92g-9f8w-j867
More information
Details
Impact
channelBinding=requireconnections can be silently downgraded fromSCRAM-SHA-256-PLUS(with channel binding) to plainSCRAM-SHA-256(without it), losing the man-in-the-middle protection the setting is meant to guarantee. An attacker who can intercept the TLS connection triggers the downgrade with a certificate whose signature algorithm has notls-server-end-pointchannel-binding hash. Examples areEd25519,Ed448, and post-quantum algorithms.Two issues combine in releases 42.7.4 through 42.7.11:
com.ongres.scram:scram-client(3.1 or 3.2) returns an empty byte array instead of failing when it cannot derive the binding hash for such a certificate. This is the library issue tracked as GHSA-p9jg-fcr6-3mhf.channelBinding=requirewhere it matters.ScramAuthenticatorchecks only that the server advertised a-PLUSmechanism; it neither rejects the empty binding nor checks that the negotiated mechanism uses channel binding. The connection therefore downgrades silently, and would do so even against a fixedscram-client, because the missing enforcement is in pgJDBC's own code.Only connections that set
channelBinding=requireare affected. Under the defaultpreferpolicy, and underallowordisable, falling back to plain SCRAM is the documented behaviour. Releases before 42.7.4 are unaffected, because they do not support channel binding.Patches
Fixed in pgJDBC 42.7.12. pgJDBC now enforces channel binding in its own code, independently of the
scram-clientversion:channelBinding=require, it fails the connection when no channel-binding data can be extracted from the server certificate, instead of passing an empty value to the SCRAM client. The error names the certificate signature algorithm.-PLUSmechanism) wheneverchannelBinding=requireis set, regardless of how negotiation resolved.Upgrade to 42.7.12 or later.
Workarounds
No pgJDBC setting restores channel-binding enforcement on an affected release; upgrading is the fix.
If you cannot upgrade immediately, verify the server certificate at the TLS layer so that a man-in-the-middle cannot present a substitute certificate. Set
sslmode=verify-fullwith a truststore that contains only your server's CA. This defence is independent of channel binding and blocks the same attacker. Connections that rely onchannelBinding=requirein place of certificate verification have no equivalent workaround and should upgrade.References
com.ongres.scram:scram-clientissue (root cause of the empty channel-binding value).scram-client3.3 release (library fix): https://github.com/ongres/scram/releases/tag/3.3Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
pgjdbc/pgjdbc (org.postgresql:postgresql)
v42.7.12Security
Under
channelBinding=require, the driver silently downgraded fromSCRAM-SHA-256-PLUS(with channel binding) to plainSCRAM-SHA-256(without it) when the server presented a certificate whose signature algorithm has notls-server-end-pointchannel-binding hash (e.g.Ed25519, Ed448, or post-quantum algorithms). An attacker who can intercept the TLS connection could exploit this to strip channel-binding protection.The fix enforces channel binding in the driver's own code: it now fails the connection when no binding data can be extracted, and verifies the negotiated mechanism uses channel binding (
-PLUS) whenrequireis set.Only connections that set
channelBinding=requireare affected. The defaultpreferpolicy and releases before 42.7.4 (which introduced channel-binding support) are unaffected.See the Security Advisory for more detail.
The following CVE-2026-54291 has been issued.
v42.7.11Security
pgjdbc was vulnerable to a client-side denial of service in SCRAM-SHA-256 authentication, where a malicious or compromised PostgreSQL server could specify an extremely large PBKDF2 iteration count, causing the client to consume unbounded CPU and potentially exhaust connection pools. The fix introduces a new scramMaxIterations connection property (defaulting to 100,000) to cap iteration counts before computation begins.
See the Security Advisory for more detail.
The following CVE-2026-42198 has been issued.
Added
Changed
Fixed
Configuration
📅 Schedule: Branch creation - "" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.