PostgreSQL vulnerabilities
126 known CVE vulnerabilities in PostgreSQL, translated and rated.
- CVE-2026-116316High
Improper protection of alternate path in PostgreSQL security-restricted operations allows an object creator to execute arbitrary SQL as the operation's caller, via a domain, enum, or range type created in pg_temp. The victim session must later run a query containing an unqualified type name; autovacuum and other common security-restricted operation users do not do so, so they are unaffected. Versions before 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116315High
Heap-based buffer overflow in PostgreSQL tsvector_delete() allows a database user to execute arbitrary code as the operating system user running the database, via a tsvector whose lexeme data uses a nonstandard but valid ordering that requires additional alignment padding in the result. Versions before 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116312Medium
Inconsistent transition-capture state in PostgreSQL MERGE allows a table data modifier to make an AFTER trigger process the wrong new row, via a partitioned table MERGE that performs an INSERT before an UPDATE. Within major versions 15-18, minor versions before PostgreSQL 18.7, 17.12, 16.16, and 15.20 are affected. Versions before PostgreSQL 15 are unaffected.
- CVE-2026-116311Medium
Missing authorization in PostgreSQL DROP OWNED allows a role to remove itself from restrictive row level security policies, thereby reading or modifying rows that the policy was intended to deny, via queries after the DROP OWNED. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116310Medium
Use after free in PostgreSQL COPY FROM error reporting allows a database user to disclose portions of server memory, via a longer input row following an ignored or nullified conversion error. file_fdw reaches the same code path in affected version 18. Within major versions 17-18, minor versions before PostgreSQL 18.7 and 17.12 are affected. Versions before PostgreSQL 17 are unaffected.
- CVE-2026-116308Medium
Buffer over-read in PostgreSQL dict_int allows a database user to disclose portions of server memory, via a zero-length token. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116306High
Type confusion in PostgreSQL composite-value field assignment allows an object creator to execute arbitrary code as the operating system user running the database, via changing a composite type between deforming and reforming a value. Versions before 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116304High
Use after free in PostgreSQL coordination of anonymous RECORD type identifiers among parallel workers allows a database user to execute arbitrary code as the operating system user running the database, via causing one process to free a shared tuple descriptor while another process retains and later uses its address. Versions before 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116303Low
Missing authorization in PostgreSQL type conversion allows a database user to invoke a cast function despite lacking EXECUTE privilege on that function, via foreign keys, to_json(), and others. A successful attack requires the attacker to search each database for access-restricted cast functions and identify confidentiality impact specific to each function implementation found. There are few or no practical examples of an access-restricted cast function or of a cast function having confidentiality impact. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-6471High
Missing authorization in PostgreSQL logical decoding allows a non-superuser holding REPLICATION privilege to dlopen any file visible to the operating system account running the server, via the choice of logical decoding plugin. This in turn runs arbitrary code as that account. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-6470Medium
In PostgreSQL, missing authorization in DDL commands allows an object creator to cause denial of service against ALTER and DROP of a type by creating a dependency on it. Affected versions are before 18.6, 17.11, 16.15, 15.19, and 14.24.
- CVE-2026-6469Low
In PostgreSQL, the ALTER TABLE ALTER TYPE command incorrectly reassigns ownership of dependent statistics objects to the current user. This wrongly allows the table owner to run DROP STATISTICS and ALTER STATISTICS, while denying those commands to the prior owner. In many ownership arrangements, DROP TABLE still removes statistics objects, so the exploit often achieves nothing.
- CVE-2026-6464High
Untrusted data inclusion in PostgreSQL psql COPY may allow a server administrator to elicit execution of data lines as psql commands, via error injection. If the "COPY FROM STDIN" or "\copy FROM STDIN" command fails before the server indicates that it awaits input rows, psql processes the in-line data rows as psql commands. "COPY FROM" with a filename is unaffected. The server administrator has no inherent control over the data rows, so a complete attack requires the attacker to separately acquire control of both the server and the data rows. Alternatively, an attacker controlling data rows alone might complete an attack through a coincidental error that they don't control. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-19385High
Heap buffer overflow in PostgreSQL pg_dump of long function transform lists allows an object creator to execute arbitrary code as the operating system user running pg_dump, via a crafted transform list. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-18408High
Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql \restrict meta-command input expansion. The fix for CVE-2025-8714 introduced \restrict and \unrestrict to block this attack, but \unrestrict itself was sufficient for an attack. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. Non-core use of \restrict would be affected, but we've not identified non-core use. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-18024Medium
In PostgreSQL, the ascii() SQL function has a buffer over-read that allows a user to disclose up to 3 bytes after the end of a specific allocation via a crafted text value. Affected versions are before 18.6, 17.11, 16.15, 15.19, and 14.24.
- CVE-2026-16241Low
Integer underflow in PostgreSQL ECPG allows a database server administrator to cause temporary denial of service against the ECPG client by sending a bytea value lacking the mandatory prefix. The client overwrites a large memory region with bytes outside attacker control, typically causing SIGSEGV, but rare cases might achieve client-specific integrity impact.
- CVE-2026-16239High
Type confusion in PostgreSQL "portal"/cursor lifecycle allows a user to execute arbitrary code as the operating system user running the database, via re-creation of a cursor or other portal with different types. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-16238High
Type confusion in PostgreSQL pg_restore_attribute_stats() allows an object creator to execute arbitrary code as the operating system user running the database, via conflation of range and multirange values. Within major version 18, minor versions before PostgreSQL 18.6 are affected. Versions before PostgreSQL 18 are unaffected.
- CVE-2026-15742High
Integer wraparound in PostgreSQL fuzzystrmatch allows a user to direct writes to a huge range of addresses, executing arbitrary code as the operating system user running the database, via extreme inputs to SQL function levenshtein() or levenshtein_less_equal(). Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-15741High
SQL injection in PostgreSQL EXTRACT() deparse allows an object owner to execute arbitrary SQL as a superuser via a hostile object definition. Attacks affect expression deparse consumers broadly, including pg_dump, psql commands like \sf, and any similar usage in non-core tools. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14681Medium
In PostgreSQL, improper enforcement of message integrity in GSSAPI support allows a user to negotiate GSSAPI contrary to pg_hba.conf rules via initial direct TLS connection. Despite pg_hba.conf appearing to require GSSAPI, the connection may exchange data over TLS encryption alone. If TLS settings are more permissive than GSS settings, the connection may continue with lesser protection. Affected are major versions 17-18, before 18.6 and 17.11.
- CVE-2026-14680High
Type confusion with PostgreSQL "internal" data type arguments allows any user to execute arbitrary code as the operating system user running the database, via calls to functions with that argument type. Type "internal" represents a class of mutually-incompatible data structures not intended for access from SQL. The system intended to prevent such function calls, but this prevention had gaps. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14679High
Stack buffer overflow in PostgreSQL argument name matching allows an object creator to achieve unknown impacts via OUT parameter count. The attack can write only 0x0 and 0x1 bytes. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14678Medium
In PostgreSQL, the pg_trgm index picksplit function reads past the end of a heap buffer. This might allow a table maintainer to infer limited memory values via the lossy signal of index split choices. Affected versions are before 18.6, 17.11, 16.15, 15.19, and 14.24.
- CVE-2026-14677High
In 32-bit builds of PostgreSQL, an integer wraparound in pltcl and plperl allows an object creator to cause the server to undersize an allocation and write out-of-bounds via crafted function bodies. This may execute arbitrary code as the operating system user running the database. CVE-2026-6473 had fixed similar problems. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14676High
Heap buffer overflow in PostgreSQL pg_stat_statements allows the query author to execute arbitrary code as the operating system user running the database, via crafted queries containing array constants. Within major version 18, minor versions before PostgreSQL 18.6 are affected. Versions before PostgreSQL 18 are unaffected.
- CVE-2026-14673Low
Untrusted search path in PostgreSQL amcheck allows a grantee of amcheck function EXECUTE privilege to execute arbitrary functions as the owners of expression indexes that depend on the search path, by setting a hostile search path before calling the amcheck function. Affected versions include 18, 16, 15, and 14 before specific minor versions; PostgreSQL 17 is unaffected.
- CVE-2026-14672Medium
In PostgreSQL SCRAM authentication, an observable response discrepancy allows an unauthenticated user to test the existence of a user by observing the SCRAM iteration count. Affected are major versions 16-18, before 18.6, 17.11, and 16.15.
- CVE-2026-14671High
Type confusion in PostgreSQL module "refint" allows an object creator to execute arbitrary code as the operating system user running the database. The fix for this emerged as a non-security bug report, and the fix appears in the git repository with subject "refint: Remove plan cache.", without a CVE number. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14670High
Heap buffer overflow in PostgreSQL plperl return of a tied hash allows the function owner to execute arbitrary code as the operating system user running the database, via a crafted function body. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14669High
Heap buffer overflow in PostgreSQL to_char(timestamptz) allows the party choosing the timezone to execute arbitrary code as the operating system user running the database, via a long POSIX timezone abbreviation. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14668High
Type confusion regarding input of PostgreSQL ctid data type selectivity estimator allows an object creator to view a calculation derived from the value of an arbitrary 4-byte span of memory, via a chosen non-ctid input. While the calculation loses precision, substantial memory value recovery appears possible. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14666Medium
In PostgreSQL, incomplete tracking of changes to role membership, role attributes, and database ownership allows a query to continue using cached row-level security policies after those changes require a different policy, via plan reuse. Stale policies persist until cache invalidation or session end. Affected versions are before 18.6, 17.11, 16.15, 15.19, and 14.24.
- CVE-2026-14664High
Heap buffer overflow in PostgreSQL regexp allows the query author to execute arbitrary code as the operating system user running the database, via text that would not pass encoding validation. This shares heritage with CVE-2026-2006, but this case involved unanticipated data growth when round-tripped through pg_wchar. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-14663Medium
In PostgreSQL, the pgcrypto extension stores cleartext when ciphers are disabled, allowing a user to recover cleartext via direct observation of faulty ciphertext. The OpenSSL version and configuration determine disabled ciphers. If the application accepts encrypted data as input, decryption may succeed even with the wrong key, losing MDC protection. Affected versions are before 18.6, 17.11, 16.15, 15.19, and 14.24.
- CVE-2026-14662High
Integer wraparound in PostgreSQL tsvector and tsquery data type functions allows an unprivileged database user to cause the server to undersize an allocation and write out-of-bounds, via crafted large inputs. This may execute arbitrary code as the operating system user running the database. These types are typically sourced from application logic, not taken from the application's user. Hence, application users attacking the database, through the application as a conduit, are unlikely. CVE-2026-6473 had fixed similar problems. Versions before PostgreSQL 18.6, 17.11, 16.15, 15.19, and 14.24 are affected.
- CVE-2026-49004Medium
The built-in PostgreSQL service on the mobile device suffers from misconfiguration flaws and command injection vulnerabilities. This service listens on a specific port, runs with root privileges, and is protected by weak credentials. The database supports the COPY FROM PROGRAM syntax, allowing local attackers to bypass Android's permission sandbox and gain full root access.
- CVE-2026-6638Low
In PostgreSQL, an SQL injection in 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. Major versions 16, 17, and 18 before 18.4, 17.10, and 16.14 are affected; versions before 16 are unaffected.
- CVE-2026-6637High
A stack buffer overflow in the PostgreSQL "refint" module allows an unprivileged database user to execute arbitrary code as the operating system user running the database. A distinct attack is possible via SQL injection if an application declares a user-controlled column as a "refint" cascade primary key. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
- CVE-2026-6575Medium
In PostgreSQL, the pg_restore_attribute_stats() function accepts array values of unmatched length, causing query planning to read past the 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-6479High
Uncontrolled recursion in PostgreSQL SSL and GSS negotiation allows an attacker able to connect to an AF_UNIX socket to cause sustained denial of service. If SSL and GSS are both disabled, the same is possible via TCP socket access. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
- CVE-2026-6478Medium
A covert timing channel in the comparison of MD5-hashed passwords 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, existing databases may have MD5-hashed passwords from upgrades from PostgreSQL 13 or earlier. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
- CVE-2026-6477High
In PostgreSQL libpq, the lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions use the inherently dangerous PQfn(..., result_is_int=0, ...) function, allowing the server superuser to overwrite a client stack buffer with arbitrarily-large data. Like gets(), PQfn stores arbitrary-length data into a buffer of unspecified size. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
- CVE-2026-6476High
A 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 17 are unaffected.
- CVE-2026-6475High
In PostgreSQL, pg_basebackup plain format and pg_rewind follow symlinks, allowing an origin superuser to overwrite local files such as /var/lib/postgres/.bashrc and hijack the operating system account. Affects versions before 18.4, 17.10, 16.14, 15.18, and 14.23.
- CVE-2026-6473High
An integer wraparound vulnerability 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. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
- CVE-2026-6472Medium
PostgreSQL before 18.4, 17.10, 16.14, 15.18, and 14.23 has missing authorization in CREATE TYPE, allowing an object creator to hijack other queries that use search_path to find user-defined types. The victim then executes arbitrary SQL functions chosen by the attacker.
- CVE-2026-32286High
The DataRow.Decode function fails to properly validate field lengths. A malicious PostgreSQL server can send a DataRow message with a negative field length, causing a slice bounds out of range panic.
- CVE-2026-2007High
A heap buffer overflow in PostgreSQL pg_trgm allows a database user to achieve unknown impacts via a crafted input string. The attacker has limited control over byte patterns, but privilege escalation is not ruled out. Affects versions 18.0 and 18.1.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

