PostgreSQL JDBC Driver Vulnerability in Query Parsing
CVE-2026-134841
What is CVE-2026-134841?
The PostgreSQL JDBC Driver (pgjdbc) contains a vulnerability where the query parser misinterprets certain quoted text. Specifically, it fails to properly recognize and handle instances of } within literals, causing JDBC escape sequences like {ts} to be improperly parsed, leading to potential SQL injection risks. Additionally, dollar quotes with non-ASCII tags or spaces are misidentified, and escaped single quotes in E'' strings are treated as standard strings. The driver also incorrectly processes functions such as {fn right} and {fn timestampdiff} when negative arguments are involved, creating a vulnerability where correctly quoted text can execute as SQL with the application's database permissions. Upgrade to version 42.7.15 or later to remediate these issues.
Affected Version(s)
pgjdbc 0 < 42.7.15
References
CVSS V3.1
Timeline
Vulnerability published
Vulnerability Reserved
