Description
pgjdbc, the PostgreSQL JDBC Driver, misreads some quoted text in its query parser. A `}` inside a literal ends a JDBC escape such as `{ts}`, and the rest of the literal is translated as SQL. A dollar quote whose tag has a non-ASCII symbol or space is not recognized. An `E''` string with a doubled quote is scanned as a standard string. `{fn right}` and `{fn timestampdiff}` with a negative argument produce a `--` comment. In each case text that the application quoted correctly can run as SQL with the privileges of the application's database role. All versions before 42.7.15 are affected, and 42.7.15 fixes the problem.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pgjdbc | pgjdbc | < 42.7.15 | 42.7.15 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libpgjava | No fix yet | — |
| Debian 13 | libpgjava | No fix yet | — |
| Debian 12 | libpgjava | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libpgjava | No fix yet | — |
| Ubuntu 26.04 LTS | libpgjava | No fix yet | — |
| Ubuntu 24.04 LTS | libpgjava | No fix yet | — |
| Ubuntu 22.04 LTS | libpgjava | No fix yet | — |
| Ubuntu 16.04 LTS | libpgjava | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 14.04 LTS | libpgjava | No fix yet | — |
| Ubuntu Pro 20.04 LTS | libpgjava | No fix yet | — |
| Ubuntu Pro 18.04 LTS | libpgjava | No fix yet | — |
Advisories 1
- WID-SEC-2026-4746 PostgreSQL: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 23, 2026