Skip to content

Update dependency org.postgresql:postgresql to v42.7.12 [SECURITY]#41

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/postgresql
Open

Update dependency org.postgresql:postgresql to v42.7.12 [SECURITY]#41
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/postgresql

Conversation

@renovate

@renovate renovate Bot commented Jan 14, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
org.postgresql:postgresql (source) 42.7.442.7.12 age confidence

pgjdbc Client Allows Fallback to Insecure Authentication Despite channelBinding=require Configuration

BIT-postgresql-jdbc-driver-2025-49146 / CVE-2025-49146 / GHSA-hq9p-pm7w-8p54

More information

Details

Impact

When the PostgreSQL JDBC driver is configured with channel binding set to required (default value is prefer), the driver would incorrectly allow connections to proceed with authentication methods that do not support channel binding (such as password, MD5, GSS, or SSPI authentication). This could allow a man-in-the-middle attacker to intercept connections that users believed were protected by channel binding requirements.

Patches

TBD

Workarounds

Configure sslMode=verify-full to prevent MITM attacks.

References

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


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, 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:

  1. The connection uses SCRAM-SHA-256 authentication.
  2. The client reaches a malicious, compromised, or attacker-controlled PostgreSQL endpoint.
  3. 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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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 Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

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=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:

  1. 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.
  2. 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

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

pgjdbc/pgjdbc (org.postgresql:postgresql)

v42.7.12

Security
  • 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.

v42.7.11

Security
  • 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.
Added
  • feat: implement require_auth connection property, aligning with libpq behavior PR #​3895
Changed
  • chore: replace Appveyor CI with ikalnytskyi/action-setup-postgres PR #​3966
  • chore: upgrade Gradle to v9 PR #​3978
Fixed
  • fix: ensure extended protocol messages end with Sync message PR #​3728
  • fix: enable cursor-based fetching in extended protocol when transaction started via SQL command PR #​3996
  • fix: retry with SSL on IOException when sslMode=ALLOW PR #​3973
  • fix: make sure the driver honours connectTimeout when retrying the connection PR #​3968
  • fix: allow fallback to non-SSL connection when sslMode=prefer and sslResponseTimeout kicks in PR #​3968
  • fix: catch SecurityException from setContextClassLoader on ForkJoinPool workers PR #​3962
  • fix: use compareTo for LogSequenceNumber comparison to handle unsigned values correctly PR #​3961
  • fix: release COPY lock on IOException to prevent connection hang PR #​3957
  • fix: return jsonb as PGObject instead of String PR #​3956
  • fix: align SSL key file permission check with libpq PR #​3952
  • fix: guard connection closed flag with a reentrant lock to protect against concurrent close PR #​3905

v42.7.10

Changed
  • chore: Migrate to Shadow 9 PR 3931
  • style: fix empty line before javadoc for checkstyle compliance PR #​3925
  • style: fix lambda argument indentation for checkstyle compliance PR #​3922
  • test: add autosave=always|never|conservative and cleanupSavepoints=true|false to the randomized CI jobs PR #​3917
Fixed
  • fix: non-standard strings failing test for version 19 PR #​3934
  • fix: small issues in ConnectionFactoryImpl PR #​3929
  • fix: process pending responses before fastpath to avoid protocol errors PR # 3913
  • doc: use.md, fix typos PR #​3911
  • doc: datasource.md, fix minor formatting issue PR #​3912
  • doc: add the new PGP signing key to the official documentation PR #​3912
Reverted

v42.7.9

Added
  • feat: query timeout property PR #​3705
  • feat: Add PEMKeyManager to handle PEM based certs and keys PR #​3700
Changed
  • perf: optimize PGInterval.getValue() by replacing String.format with StringBuilder
  • doc: update property quoteReturningIdentifiers default value PR #​3847
  • security: Use a static method forName to load all user supplied classes. Use the Class.forName 3 parameter method and do not initilize it unless it is a subclass of the expected class
Fixed
  • fix: incorrect pg_stat_replication.reply_time calculation PR #​3906
  • fix: close temporary lob descriptors that are used internally in PreparedStatement#setBlob
  • fix: PGXAConnection.prepare(Xid) should return XA_RDONLY if the connection is read only PR #​3897
  • fix: make all Calendar instances proleptic Gregorian PR #​3837
  • fix: Simplify concurrency guards on QueryExecutorBase#transaction and QueryExecutorBase#standardConformingStrings PR #​3897
  • fix: avoid memory leaks in Java <= 21 caused by Thread.inheritedAccessControlContext PR #​3886
  • fix: Issue #​3784 pgjdbc can't decode numeric arrays containing special numbers like NaN PR #​3838
  • fix: use ssl_is_used() to check for ssl connection PR #​3867
  • fix: the classloader is nullable PR #​3907

v42.7.8

Added
  • feat: Add configurable boolean-to-numeric conversion for ResultSet getters PR #​3796
Changed
  • perf: remove QUERY_ONESHOT flag when calling getMetaData PR #​3783
  • perf: use BufferedInputStream with FileInputStream PR #​3750
  • perf: enable server-prepared statements for DatabaseMetaData
Fixed
  • fix: avoid NullPointerException when cancelling a query if cancel key is not known yet
  • fix: Change "PST" timezone in TimestampTest to "Pacific Standard Time" PR #​3774
  • fix: traverse the current dimension to get the correct pos in PgArray#calcRemainingDataLength PR #​3746
  • fix: make sure getImportedExportedKeys returns columns in consistent order
  • fix: Add "SELF_REFERENCING_COL_NAME" field to getTables' ResultSetMetaData to fix NullPointerException PR #​3660
  • fix: unable to open replication connection to servers < 12
  • fix: avoid closing statement caused by driver's internal ResultSet#close()
  • fix: return empty metadata for empty catalog names as it was before
  • fix: Incorrect class comparison in PGXmlFactoryFactory validation

v42.7.7

Security
  • security: Client Allows Fallback to Insecure Authentication Despite channelBinding=require configuration.
    Fix channel binding required handling to reject non-SASL authentication
    Previously, when channel binding was set to "require", the driver would silently ignore this
    requirement for non-SASL authentication methods. This could lead to a false sense of security
    when channel binding was explicitly requested but not actually enforced. The fix ensures that when
    channel binding is set to "require", the driver will reject connections that use
    non-SASL authentication methods or when SASL authentication has not completed properly.
    See the Security Advisory for more detail. Reported by George MacKerron
    The following CVE-2025-49146 has been issued
Added
  • test: Added ChannelBindingRequiredTest to verify proper behavior of channel binding settings

v42.7.6

Features
  • fix: Enhanced DatabaseMetadata.getIndexInfo() method, added index comment as REMARKS property PR #​3513
Performance Improvements
  • performance: Improve ResultSetMetadata.fetchFieldMetaData by using IN row values instead of UNION ALL for improved query performance (later reverted) PR #​3510
  • feat:Use a single simple query for all startup parameters, so groupStartupParameters is no longer needed PR #​3613

v42.7.5

Added
Fixed
  • regression: revert change in fc60537 PR #​3476
  • fix: PgDatabaseMetaData implementation of catalog as param and return value PR #​3390
  • fix: Support default GSS credentials in the Java Postgres client PR #​3451
  • fix: return only the transactions accessible by the current_user in XAResource.recover PR #​3450
  • feat: don't force send extra_float_digits for PostgreSQL >= 12 fix Issue #​3432 PR #​3446
  • fix: exclude "include columns" from the list of primary keys PR #​3434
  • perf: Enhance the meta query performance by specifying the oid. PR #​3427
  • feat: support getObject(int, byte[].class) for bytea PR #​3274
  • docs: document infinity and some minor edits PR #​3407
  • fix: Added way to check for major server version, fixed check for RULE PR #​3402
  • docs: fixed remaining paragraphs PR #​3398
  • docs: fixed paragraphs in javadoc comments PR #​3397
  • fix: Reuse buffers and reduce allocations in GSSInputStream addresses Issue #​3251 PR #​3255
  • chore: Update Gradle to 8.10.2 PR #​3388
  • fix: getSchemas() PR #​3386
  • fix: Update rpm postgresql-jdbc.spec.tpl with scram-client PR #​3324
  • fix: Clearing thisRow and rowBuffer on close() of ResultSet Issue #​3383 PR #​3384
  • fix: Package was renamed to maven-bundle-plugin PR #​3382
  • fix: As of version 18 the RULE privilege has been removed PR #​3378
  • fix: use buffered inputstream to create GSSInputStream PR #​3373
  • test: get rid of 8.4, 9.0 pg versions and use >= jdk version 17 PR #​3372
  • Changed docker-compose version and renamed script file in instructions to match the real file name PR #​3363
  • test:Do not assume "test" database in DatabaseMetaDataTransactionIsolationTest PR #​3364
  • try to categorize dependencies PR #​3362

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • Between 12:00 AM and 03:59 AM (* 0-3 * * *)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.5 Update dependency org.postgresql:postgresql to v42.7.6 May 28, 2025
@renovate
renovate Bot force-pushed the renovate/postgresql branch from 3425bb0 to accd488 Compare May 28, 2025 11:52
@renovate
renovate Bot force-pushed the renovate/postgresql branch from accd488 to a6fa17b Compare June 11, 2025 15:45
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.6 Update dependency org.postgresql:postgresql to v42.7.7 Jun 11, 2025
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.7 Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] Jun 11, 2025
@renovate
renovate Bot force-pushed the renovate/postgresql branch from a6fa17b to e332628 Compare December 26, 2025 02:48
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] Update dependency org.postgresql:postgresql to v42.7.8 Dec 26, 2025
@renovate
renovate Bot force-pushed the renovate/postgresql branch from e332628 to 2a7eb31 Compare December 26, 2025 06:36
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.8 Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] Dec 26, 2025
@renovate
renovate Bot force-pushed the renovate/postgresql branch from 2a7eb31 to 95337ec Compare February 16, 2026 22:51
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] Update dependency org.postgresql:postgresql to v42.7.10 Feb 16, 2026
@renovate
renovate Bot force-pushed the renovate/postgresql branch from 95337ec to 5a6e244 Compare February 17, 2026 03:03
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.10 Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] Feb 17, 2026
@renovate
renovate Bot force-pushed the renovate/postgresql branch from 5a6e244 to 417d752 Compare May 6, 2026 02:30
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.7 [SECURITY] Update dependency org.postgresql:postgresql to v42.7.11 [SECURITY] May 6, 2026
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.11 [SECURITY] Update postgresql to v42.7.11 [SECURITY] Jun 2, 2026
@renovate renovate Bot changed the title Update postgresql to v42.7.11 [SECURITY] Update postgresql [SECURITY] Jun 22, 2026
@renovate renovate Bot changed the title Update postgresql [SECURITY] Update dependency org.postgresql:postgresql to v42.7.11 [SECURITY] Jun 25, 2026
@renovate
renovate Bot force-pushed the renovate/postgresql branch from 417d752 to 22f9d29 Compare July 21, 2026 22:03
@renovate renovate Bot changed the title Update dependency org.postgresql:postgresql to v42.7.11 [SECURITY] Update dependency org.postgresql:postgresql to v42.7.12 [SECURITY] Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants