PostgreSQL
Don't miss out!
Thousands of developers use stack.watch to stay informed.Get an email whenever new security vulnerabilities are reported in any PostgreSQL product.
RSS Feeds for PostgreSQL security vulnerabilities
Create a CVE RSS feed including security vulnerabilities found in PostgreSQL products with stack.watch. Just hit watch, then grab your custom RSS feed url.
Products by PostgreSQL Sorted by Most Security Vulnerabilities since 2018
PostgreSQL JDBC Driver8 vulnerabilities
The Java JDBC Driver for PostgreSQL Database Servers also known as pgjdbc
Recent PostgreSQL Security Advisories
| Advisory | Title | Published |
|---|---|---|
| 2026-05-14 | PostgreSQL: CVE-2026-6638: PostgreSQL REFRESH PUBLICATION allows SQL injection via table name | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6637: PostgreSQL refint allows stack buffer overflow and SQL injection | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6575: PostgreSQL pg_restore_attribute_stats accepts values that cause query planning to read past end of stats array | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6479: PostgreSQL SSL/GSS init causes denial of service, via uncontrolled recursion | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6478: PostgreSQL discloses MD5-hashed passwords via covert timing channel | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6477: PostgreSQL libpq lo_* functions let server superuser overwrite client stack memory | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6476: PostgreSQL pg_createsubscriber allows SQL injection via subscription name | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6475: PostgreSQL pg_basebackup and pg_rewind can overwrite unrelated files of origin superuser choice | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6474: PostgreSQL timeofday() can disclose portions of server memory | May 14, 2026 |
| 2026-05-14 | PostgreSQL: CVE-2026-6473: PostgreSQL server undersizes allocations, via integer wraparound | May 14, 2026 |
By the Year
In 2026 there have been 17 vulnerabilities in PostgreSQL with an average score of 7.2 out of ten. Last year, in 2025 PostgreSQL had 9 security vulnerabilities published. That is, 8 more vulnerabilities have already been reported in 2026 as compared to last year. However, the average CVE base score of the vulnerabilities in 2026 is greater by 2.13.
| Year | Vulnerabilities | Average Score |
|---|---|---|
| 2026 | 17 | 7.16 |
| 2025 | 9 | 5.03 |
| 2024 | 12 | 6.48 |
| 2023 | 10 | 5.31 |
| 2022 | 13 | 7.54 |
| 2021 | 5 | 6.53 |
| 2020 | 8 | 7.57 |
| 2019 | 7 | 6.40 |
| 2018 | 9 | 8.24 |
It may take a day or so for new PostgreSQL vulnerabilities to show up in the stats or in the list of recent security vulnerabilities. Additionally vulnerabilities may be tagged under a different product or component name.
Recent PostgreSQL Security Vulnerabilities
| CVE | Date | Vulnerability | Products |
|---|---|---|---|
| CVE-2026-6638 | May 14, 2026 |
PostgreSQL <18.4,<17.10,<16.14: SQLi via ALTER SUBSCRIPTION REFRESH PUBLICATIONSQL injection in PostgreSQL logical replication ALTER SUBSCRIPTION ... REFRESH PUBLICATION allows a subscriber table creator to execute arbitrary SQL with the subscription's publication-side credentials. The attack takes effect at the next REFRESH PUBLICATION. Within major versions 16, 17, and 18, minor versions before PostgreSQL 18.4, 17.10, and 16.14 are affected. Versions before PostgreSQL 16 are unaffected. |
|
| CVE-2026-6575 | May 14, 2026 |
PostgreSQL 18 Buffer Over-Read in pg_restore_attribute_stats() (18.3)Buffer over-read in PostgreSQL function pg_restore_attribute_stats() accepts array values of unmatched length, which causes query planning to read past end of one array. This allows a table maintainer to infer memory values past that array end. Within major version 18, minor versions before PostgreSQL 18.4 are affected. Versions before PostgreSQL 18 are unaffected. |
|
| CVE-2026-6637 | May 14, 2026 |
PostgreSQL refint stack buffer overflow, <= 18.4Stack buffer overflow in PostgreSQL module "refint" allows an unprivileged database user to execute arbitrary code as the operating system user running the database. A distinct attack is possible if the application declares a user-controlled column as a "refint" cascade primary key and facilitates user-controlled updates to that column. In that case, a SQL injection allows a primary key update value provider to execute arbitrary SQL as the database user performing the primary key update. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|
| CVE-2026-6479 | May 14, 2026 |
PostgreSQL Recursion CVE-2026-6479: SSL/GSS DoS pre-18.4,17.10,16.14,15.18,14.23Uncontrolled recursion in PostgreSQL SSL and GSS negotiation allows an attacker able to connect to a PostgreSQL AF_UNIX socket to achieve sustained denial of service. If SSL and GSS are both disabled, an attacker can do the same via access to a PostgreSQL TCP socket. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|
| CVE-2026-6478 | May 14, 2026 |
PostgreSQL MD5 Timing Channel CVE-2026-6478 (v<18.4/17.10/16.14/15.18/14.23)Covert timing channel in comparison of MD5-hashed password in PostgreSQL authentication allows an attacker to recover user credentials sufficient to authenticate. This does not affect scram-sha-256 passwords, the default in all supported releases. However, current databases may have MD5-hashed passwords originating in upgrades from PostgreSQL 13 or earlier. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|
| CVE-2026-6476 | May 14, 2026 |
PostgreSQL 17.x/18.x SQLi in pg_createsubscriber (17.9/18.3)SQL injection in PostgreSQL pg_createsubscriber allows an attacker with pg_create_subscription rights to execute arbitrary SQL as a superuser. The attack takes effect when pg_createsubscriber next runs. Within major versions 17 and 18, minor versions before PostgreSQL 18.4 and 17.10 are affected. Versions before PostgreSQL 17 are unaffected. |
|
| CVE-2026-6477 | May 14, 2026 |
PostgreSQL libpq PQfn buffer overflow in lo_* before 18.4, 17.10, 16.14, 15.18Use of inherently dangerous function PQfn(..., result_is_int=0, ...) in PostgreSQL libpq lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions allows the server superuser to overwrite a client stack buffer with an arbitrarily-large response. Like gets(), PQfn(..., result_is_int=0, ...) stores arbitrary-length, server-determined data into a buffer of unspecified size. Because both the \lo_export command in psql and pg_dump call lo_read(), the server superuser can overwrite pg_dump or psql stack memory. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|
| CVE-2026-6475 | May 14, 2026 |
PostgreSQL pg_basebackup/pg_rewind SYMLINK overwrite <=18.4/17.10/16.14/15.18/14.23Symlink following in PostgreSQL pg_basebackup plain format and in pg_rewind allows an origin superuser to overwrite local files, e.g. /var/lib/postgres/.bashrc, that hijack the operating system account. It will remain the case that starting the server after these commands implicitly trusts the origin superuser, due to features like shared_preload_libraries. Hence, the attack has practical implications only if one takes relevant action between these commands and server start, like moving the files to a different VM or snapshotting the VM. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|
| CVE-2026-6474 | May 14, 2026 |
PostgreSQL timeofday() FS Vulnerability (pre-18.4,17.10,16.14,15.18,14.23)Externally-controlled format string in PostgreSQL timeofday() function allows an attacker to retrieve portions of server memory, via crafted timezone zones. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|
| CVE-2026-6473 | May 14, 2026 |
PostgreSQL <18.4 OOB Integer Wraparound Undersize AllocationInteger wraparound in multiple PostgreSQL server features allows an unprivileged database user to cause the server to undersize an allocation and write out-of-bounds. This may execute arbitrary code as the operating system user running the database. In applications that pass gigabyte-scale user inputs to the relevant database functions, the application input provider may achieve a segmentation fault. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. |
|