CVE-2026-134848: pgjdbc lets a NUL character in a connection property add startup parameters

Published Nov 23, 2026
·
Updated

pgjdbc, the PostgreSQL JDBC Driver, does not refuse a NUL character in a startup parameter. The StartupMessage is a list of NUL-terminated strings, so a NUL in the database name, user, currentSchema, options or ApplicationName adds further parameters. %00 in a URL decodes to a NUL. Someone who controls part of the URL or a property can choose another login role or add replication=database, although the connection still has to pass the authentication of that role. On a server that trusts the client, the attacker can log in as any role. All versions before 42.7.15 are affected, and 42.7.15 fixes the problem.

Affected Software

1 affected component
maven/org.postgresql/postgresql<42.7.15

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pgjdbc to a version that resolves this vulnerability.

    Fixed in 42.7.15

Event History

Nov 23, 2026
CVE Published
via MITRE·04:59 PM
Data Sourced
via MITRE·04:59 PM
RemedyDescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using pgjdbc versions before 42.7.15 are affected if an attacker can control any part of the JDBC URL or connection properties that supplies the database name, user, currentSchema, options, or ApplicationName.

2

What does an attacker need to exploit it?

The attacker needs control over a relevant connection value and can inject a NUL character, including through %00 in a URL. The resulting connection must still authenticate successfully as the injected login role, except on servers that trust the client.

3

Are trust-based PostgreSQL deployments at greater risk?

Yes. When the PostgreSQL server trusts the client, an attacker can use the injected startup parameter to log in as any role.

4

What should be done if an immediate upgrade is not possible?

Do not allow untrusted input to control JDBC URLs or the affected connection properties, and reject NUL characters and %00-encoded NULs in those values. Ensure the PostgreSQL server does not use client-trusting authentication where untrusted clients can connect.

5

How can I determine whether my deployment is affected?

Check the pgjdbc version in use: versions earlier than 42.7.15 are affected. Also identify whether externally controlled values can reach the JDBC URL or the database name, user, currentSchema, options, or ApplicationName properties.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203