CVE-2026-134848

pgjdbc lets a NUL character in a connection property add startup parameters

High published · updated

7.4
CVSS score out of 10 · NVD (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007)

Description

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 products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
org.postgresql:postgresql maven 0 → <42.7.1542.7.15 CVE.org
pgjdbc pgjdbc 0 → <42.7.1542.7.15 CVE.org

References