PostgreSQL vulnerabilities
126 known CVE vulnerabilities in PostgreSQL, translated and rated.
- CVE-2025-59470Critical
This vulnerability allows a Backup Operator to perform remote code execution (RCE) as the postgres user by sending a malicious interval or order parameter.
- CVE-2025-10226Critical
AxxonSoft Axxon One (C-Werk) 2.0.8 and earlier on Windows and Linux depends on a vulnerable PostgreSQL 10.x component. A remote attacker can exploit known PostgreSQL CVEs to escalate privileges, execute arbitrary code, or cause denial-of-service.
- CVE-2024-10979High
Incorrect control of environment variables in PostgreSQL PL/Perl allows an unprivileged database user to change sensitive process environment variables (e.g., PATH). This often suffices to enable arbitrary code execution, even if the attacker lacks a database server operating system user.
- CVE-2023-5869High
A flaw in PostgreSQL allows authenticated database users to execute arbitrary code through missing overflow checks during SQL array value modification. The issue arises from an integer overflow during array modification, which a remote user can trigger by providing specially crafted data.
- CVE-2018-1115Critical
postgresql before versions 10.4, 9.6.9 is vulnerable in the adminpack extension, the pg_catalog.pg_logfile_rotate() function doesn't follow the same ACLs than pg_rorate_logfile. If the adminpack is added to a database, an attacker able to connect to it could exploit this to force log rotation.
- CVE-2017-15098High
Invalid json_populate_recordset or jsonb_populate_recordset function calls in PostgreSQL 10.x before 10.1, 9.6.x before 9.6.6, 9.5.x before 9.5.10, 9.4.x before 9.4.15, and 9.3.x before 9.3.20 can crash the server or disclose a few bytes of server memory.
- CVE-2017-7547High
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8, and 9.6.4 are vulnerable to an authorization flaw allowing remote authenticated attackers to retrieve passwords from user mappings defined by foreign server owners without actually having the privileges to do so.
- CVE-2017-7546Critical
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to an authentication flaw allowing remote attackers to gain access to database accounts with an empty password.
- CVE-2016-5424High
PostgreSQL versions before 9.1.23, 9.2.x before 9.2.18, 9.3.x before 9.3.14, 9.4.x before 9.4.9, and 9.5.x before 9.5.4 may allow remote authenticated users with the CREATEDB or CREATEROLE role to gain superuser privileges through mishandling of special characters in database or role names.
- CVE-2016-5423High
PostgreSQL versions before 9.1.23, 9.2.x before 9.2.18, 9.3.x before 9.3.14, 9.4.x before 9.4.9, and 9.5.x before 9.5.4 allow remote authenticated users to cause a denial of service (NULL pointer dereference and server crash), obtain sensitive memory information, or possibly execute arbitrary code via (1) a CASE expression within the test value subexpression of another CASE or (2) inlining of an SQL function that implements the equality operator used for a CASE expression involving values of different types.
- CVE-2016-0773High
PostgreSQL versions before 9.1.20, 9.2.x before 9.2.15, 9.3.x before 9.3.11, 9.4.x before 9.4.6, and 9.5.x before 9.5.1 are vulnerable to remote attacks that can lead to denial of service via an infinite loop or buffer overflow.
- CVE-2016-0766High
PostgreSQL versions before 9.1.20, 9.2.x before 9.2.15, 9.3.x before 9.3.11, 9.4.x before 9.4.6, and 9.5.x before 9.5.1 do not properly restrict access to unspecified custom configuration settings (GUCS) for PL/Java, allowing attackers to gain privileges via unspecified vectors.
- CVE-2026-6467High
Uncontrolled search path element in PostgreSQL CREATE EXTENSION allows an attacker with database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. The attack vector includes ALTER SCHEMA ... RENAME or CREATE EXTENSION ... SCHEMA "$user"; ALTER EXTENSION was also affected. A trusted-extension script located the wrong object and executed arbitrary SQL of the attacker's choice.
- CVE-2026-6460High
Type confusion in PostgreSQL allows an object creator to execute arbitrary code as the operating system user running the database, primarily via ALTER ... SET DATA TYPE. Other DDL attack routes exist, such as "ALTER TABLE ... ADD COLUMN; ROLLBACK; ALTER TABLE ... ADD COLUMN". The system had inadequate tracking of typed values, and values were not self-identifying, so stale values could appear in data dictionary entries, PL/pgSQL variables, and many other parts of the system.
- CVE-2026-18447High
Type confusion in PostgreSQL SQL-language functions allows an object creator to execute arbitrary code as the operating system user running the database, via an output parameter of type "any". Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-16240Low
Use of externally-controlled format string in PostgreSQL pg_basebackup allows an attacker having already compromised a server to achieve disclosure from pg_basebackup memory, via backup manifest bytes. The vulnerability does not return the improperly-read bytes back to the attacker's server, so a successful attack would need separate implementation-specific secrets for that. Integrity impact is unlikely; in particular, the applicable formatter does not support %n. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-16237Medium
Improper protection in PostgreSQL INSERT ... ON CONFLICT on auto-updatable views allows an attacker having INSERT and UPDATE privileges on the view to read and modify every row in the view's base table via iterated INSERT ... ON CONFLICT DO UPDATE. This bypasses the view's WHERE condition, whether or not the view is a security_barrier view.
- CVE-2026-14661High
External control of file name in PostgreSQL dblink and CREATE/ALTER SUBSCRIPTION allows a user to achieve persistent denial of service by appending invalid data to a chosen file. Specifically, the "sslkeylogfile" connection parameter appends data in NSS keylog format to a file of the user's choosing; this mechanism cannot add arbitrary bytes. Within major version 18, minor versions before 18.7 are affected; versions before 18 are also affected if libpq version 18 or later is installed and in use by the server.
- CVE-2026-120154Medium
Improper protection in PostgreSQL INSERT ... ON CONFLICT allows an attacker having INSERT, UPDATE, and applicable SELECT privileges on the table to read every row despite row security policies, via iterated INSERT ... ON CONFLICT DO UPDATE. Unlike CVE-2026-16237, this does not facilitate improper writes.
- CVE-2026-120153High
SQL injection in PostgreSQL extension-script substitutions allows an attacker with database-level CREATE privilege to execute arbitrary code as the bootstrap superuser, via a schema or owner name containing newlines or other special substrings. This is similar to CVE-2023-39417, but it requires a non-bundled extension with a vulnerable script pattern. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-120152Medium
Use after free in PostgreSQL pg_show_all_settings() allows a database user to retrieve memory contents via loading a module while the function is scanning custom-variable placeholders that the module replaces and frees. Within major versions 16-18, minor versions before 18.7, 17.12, and 16.16 are affected.
- CVE-2026-120151High
Type confusion in PostgreSQL plpgsql record-field assignment allows an object creator to execute arbitrary code as the operating system user running the database, via a reentrant domain CHECK that changes a RECORD variable's row type while a value is being cast. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-120150High
Use after free in PostgreSQL expanded-record domain checks allows an object creator to execute arbitrary code as the operating system user running the database, via repeated checks of a domain over a composite type that cause reuse of a dangling memory-context pointer. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-120149High
Heap-based buffer overflow in PostgreSQL foreign batch inserts allows a foreign server to execute arbitrary code by reporting that it inserted more rows than the server supplied. postgres_fdw can legitimately encounter this when a rule on the remote table expands an INSERT into additional rows. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-120148High
Type confusion in PostgreSQL extended statistics allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via a statistics expression of an anonymous RECORD type whose backend-local type identifier denotes a different row type in another session.
- CVE-2026-120147High
Use after free in the PostgreSQL dblink extension allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via type conversion code that re-enters dblink and closes a connection whose results an outer dblink call is reading.
- CVE-2026-120146Medium
Missing authorization in PostgreSQL REASSIGN OWNED allows a role granted INHERIT but not SET to transfer objects to the granted role. It also allows reassignment of database ownership without the CREATEDB privilege, which equivalent ALTER ... OWNER commands block.
- CVE-2026-120145High
Missing authorization in PostgreSQL logical replication allows a compromised publisher to execute arbitrary code as the operating system user running the superuser-owned subscription. Exploitation occurs by naming a system catalog as a replication target. Only subscriptions owned by a superuser are vulnerable.
- CVE-2026-120144High
Type confusion from incomplete PostgreSQL type-cache invalidation allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via a composite type change while its cache entry is being populated. Within major version 18, minor versions before 18.7 are affected; versions before 18 are unaffected.
- CVE-2026-120143High
Use after free in PostgreSQL trigger functions allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via a cursor over a transition table.
- CVE-2026-120142High
Type confusion in PostgreSQL anonymous RECORD types allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via row types having dropped attributes in the same positions but with different widths or alignments. Within major versions 17-18, minor versions before 18.7 and 17.12 are affected; versions before 17 are unaffected.
- CVE-2026-120141High
Type confusion in PostgreSQL materialized set-returning functions allows a database user to execute arbitrary code as the operating system user running the database. Exploitation occurs via returning rows having different dynamic RECORD return types; json_populate_recordset() is one affected function.
- CVE-2026-120139High
Integer wraparound in PostgreSQL in-memory tuple-size calculations allows a database user to execute arbitrary code as the operating system user running the database. Exploitation occurs via oversized tuple data.
- CVE-2026-116336High
Operation on a dropped index in PostgreSQL REINDEX CONCURRENTLY allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via an index expression that issues DROP INDEX.
- CVE-2026-116335High
Type confusion in PostgreSQL operator commutator and negator links allows an object creator to execute arbitrary code as the operating system user running the database. Exploitation occurs via linking operators having different result types or creating inconsistent reciprocal links.
- CVE-2026-116333Medium
Buffer over-read in PostgreSQL parallel B-tree scans allows an object creator to read attacker-chosen server-memory addresses via a function incorrectly marked PARALLEL SAFE or STABLE to make participating workers build different scan-key arrays. Within major versions 17-18, minor versions before 18.7 and 17.12 are affected.
- CVE-2026-116332High
Use after free in PostgreSQL portal setup allows an object creator to execute arbitrary code as the operating system user running the database, via running user-defined code during planning or executor startup that closes the portal currently being prepared. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116331High
Type confusion in PostgreSQL min/max aggregate optimization allows an object creator to execute arbitrary code as the operating system user running the database, via a user-defined aggregate whose SORTOP option causes the planner to treat the aggregate's input and result as the same type when they differ. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116330High
Untrusted data inclusion in PostgreSQL pg_dump tar-format restore.sql allows a compromised origin server to execute arbitrary code as the client operating system account running psql, via the predictable restriction key in restore.sql. This is a gap in the fix for CVE-2025-8714. restore.sql is undocumented. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116329High
Type confusion in PostgreSQL statistics import allows a table maintainer to execute arbitrary code as the operating system user running the database, via nested SET DATA TYPE during conversion of values to import. Within major version 18, minor versions before PostgreSQL 18.7 are affected. Versions before PostgreSQL 18 are unaffected.
- CVE-2026-116328High
Integer wraparound in PostgreSQL generation memory contexts allows a database user to execute arbitrary code as the operating system user running the database, via freeing an allocation larger than 1 GB and causing its block to be reused for smaller chunks whose back-pointer offset cannot represent that position. Within major versions 16-18, minor versions before PostgreSQL 18.7, 17.12, and 16.16 are affected. Versions before PostgreSQL 16 are unaffected.
- CVE-2026-116327Medium
Exposure of sensitive information in PostgreSQL security_barrier processing allows a database user to infer values hidden by a security_barrier view via applying a leaky function to a CASE test value or internal parameter that indirectly represents a protected column.
- CVE-2026-116326High
Uncaught exceptions in PostgreSQL plperl allow an object creator to cause use of a stale sigjmp_buf, via a tied Perl object, or a Perl object whose overloaded conversion throws while plperl is handling another error. We have not ruled out arbitrary code execution on some platform. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116325High
SQL injection in PostgreSQL reindexdb allows an object creator to execute arbitrary SQL as the database user running reindexdb, via a crafted index name embedded in the parallel catalog query for --jobs with --index. Within major versions 17-18, minor versions before PostgreSQL 18.7 and 17.12 are affected. Versions before PostgreSQL 17 are unaffected.
- CVE-2026-116323High
Use after free in PostgreSQL pltcl allows an object creator to execute arbitrary code as the operating system user running the database, via a domain CHECK that re-enters the Tcl interpreter and frees or changes a string still used by the outer result conversion. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116322Medium
Improper locking in PostgreSQL startup processing allows an unauthenticated network client to trigger a server restart by arranging for authentication_timeout to arrive while it holds a spinlock during cancel handling. Within major version 18, minor versions before 18.7 are affected.
- CVE-2026-116321Medium
Improper null termination in PostgreSQL array element assignment allows a database user to disclose server memory via changing the final byte of a fixed-length name value to a nonzero byte and passing it to code that treats the value as a C string.
- CVE-2026-116320High
Use after free in PostgreSQL plperl allows an object creator to execute arbitrary code as the operating system user running the database, via dropping the final reference to a Perl array or hash while PostgreSQL is converting that object. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116319High
Use after free in PostgreSQL plperl allows an object creator to execute arbitrary code as the operating system user running the database, via reentrant return_next() calls. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
- CVE-2026-116317High
Heap-based buffer overflow in PostgreSQL ts_rank_cd() may allow a database user to execute arbitrary code as the operating system user running the database, via an invalid tsvector containing duplicate positions. Versions before 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

