CVE-2026-134848 in pgjdbcinfo

Summary

by MITRE • 11/23/2026

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.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/26/2026

The PostgreSQL JDBC Driver, known as pgjdbc, contains a critical input validation flaw that allows an attacker to manipulate database connection parameters through NUL character injection. This vulnerability stems from how the driver handles the StartupMessage protocol structure in its communication with the PostgreSQL server. The startup message is fundamentally composed of a list of key-value pairs separated by NUL characters and terminated by another NUL byte. In standard string processing, particularly when handling URLs where percent-encoded sequences like %00 are decoded into actual NUL bytes, the presence of an unhandled NUL character within a parameter value such as database name, user, currentSchema, options, or ApplicationName causes premature termination of that specific field. This truncation effectively allows subsequent data in the buffer to be interpreted as new key-value pairs rather than part of the original string.

This technical flaw creates a significant security risk by enabling parameter injection attacks. An attacker who controls any portion of the connection URL or configuration properties can insert NUL characters to truncate existing parameters and append malicious ones. For instance, an attacker could inject replication=database into the startup message, potentially altering how the connection is handled at the protocol level. More critically, if the application allows user input to influence these fields without strict sanitization, an adversary might attempt to override authentication credentials or other critical settings. Although the driver still requires successful authentication for any role specified in the injected parameters, this capability significantly expands the attack surface by allowing manipulation of connection metadata and potentially bypassing intended configuration constraints.

The operational impact of this vulnerability is severe on systems configured with trust-based authentication mechanisms. On a PostgreSQL server that trusts client connections without requiring password verification or other strong authentication methods, an attacker exploiting this flaw can log in as any role defined in the database cluster. This effectively grants unauthorized administrative access to sensitive data and system functions. Even in environments using stronger authentication, the ability to inject parameters like replication=database could lead to unintended behavior, such as forcing a connection into logical replication mode, which may expose additional attack vectors or disrupt service availability depending on server configuration. The vulnerability affects all versions of pgjdbc prior to 42.7.15, highlighting the importance of keeping JDBC drivers up to date in production environments.

To mitigate this risk, organizations must upgrade immediately to version 42.7.15 or later of the PostgreSQL JDBC Driver, which implements proper validation and rejection of NUL characters within startup parameters. Additionally, developers should enforce strict input sanitization on all connection strings derived from user-controlled sources, ensuring that no percent-encoded control characters are passed directly into driver configuration objects. Implementing defense-in-depth strategies such as using non-trust authentication methods like scram-sha-256 and restricting database roles to least privilege principles can further reduce the impact of potential exploitation attempts. This issue is classified under CWE-78 Improper Neutralization of Special Elements used in an OS Command, specifically relating to injection via special element manipulation, and aligns with ATT&CK techniques involving command line interface manipulation for lateral movement or access credential theft.

Responsible

PostgreSQL

Reservation

11/22/2026

Disclosure

11/23/2026

Moderation

accepted

CPE

ready

EPSS

0.00659

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!