CVE-2026-6471: Twelve-Year-Old PostgreSQL Flaw Grants Full Server Control

Red | Vulnerability
CVE-2026-6471: Twelve-Year-Old PostgreSQL Flaw Grants Full Server Control
HiveForce Labs Threat Advisory · Vulnerability Report

CVE-2026-6471: A Twelve-Year-Old Flaw Grants Full Server Control

A missing-authorization bug in PostgreSQL logical decoding lets a REPLICATION-only role load an arbitrary library and escalate straight to superuser.

TA2026262Threat Level: RedAdmiralty Code: A1Published Sep 08, 2026CVE-2026-6471CVSS 7.2
First Seen2014
CVECVE-2026-6471
NamePostGREShell
CVSS Score7.2
Zero-DayNo
CISA KEVNo
Patch AvailableYes
CWECWE-862
Report TypeVulnerability

First Seen: 2014

Affected Products: PostgreSQL (core server)

Impact: CVE-2026-6471 (“PostGREShell”, CVSS 7.2) is a missing-authorization flaw (CWE-862) in PostgreSQL’s logical decoding, where a non-superuser REPLICATION role can name an arbitrary library as an output plugin and have the server load and execute it as the postgres OS user, enabling escalation to database superuser and persistent backdoor access. The defect has been latent since version 9.4 (2014) and affects all supported branches before 18.6, 17.11, 16.15, 15.19, and 14.24, patched August 13, 2026. Exploitation requires a REPLICATION credential and wal_level = logical; it is fileless over SMB on Windows but needs file-write access on Linux/macOS. It is not known to be exploited in the wild, though a public proof-of-concept exists. Patch to a fixed release, revoke unnecessary REPLICATION privileges, and restrict replication access to trusted hosts.

CVE

CVENameAffected ProductZero-DayCISA KEVPatch
CVE-2026-6471(PostGREShell) PostgreSQL Output Plugin Missing Authorization VulnerabilityPostgreSQL (core server)NoNoYes

Vulnerability Details

#1
CVE-2026-6471 is a high-severity flaw (CVSS 7.2) in PostgreSQL’s logical decoding subsystem, arising from missing authorization (CWE-862) in how the server loads output plugins during logical replication. When a replication-capable client creates a logical replication slot, it names the output plugin the server should load; on affected versions that name reaches the library loader without the authorization and path checks applied to the SQL loading path. A role holding only the REPLICATION attribute, not a superuser, can therefore specify an arbitrary filesystem path as the plugin, causing the server to load and execute that shared library within its own backend process.
#2
Because that code runs below the SQL permission layer, it bypasses roles, ACLs, and row-level security entirely. In demonstrated exploitation the loaded library writes to the role catalog to grant itself permanent superuser status and establishes persistence, rewriting host-based authentication for passwordless access, preloading the payload into every new backend, and reapplying superuser if reverted. Two conditions must hold: a REPLICATION-capable credential and wal_level = logical. The route to code execution is platform-dependent: on Windows the plugin name resolves over SMB from an attacker server with nothing written to disk, whereas on Linux and macOS the attacker generally needs file-write access first.
#3
The defect has existed since logical decoding shipped in PostgreSQL 9.4 in 2014, latent for roughly twelve years, and affects every supported branch before the fix. PostgreSQL patched it on August 13, 2026 in releases 18.6, 17.11, 16.15, 15.19, and 14.24; branches 9.4-13 are end-of-life and unpatched. The fix adds a reloadable server parameter that acts as an allow-list of libraries permitted to load as output plugins, defaulting to the built-in plugins only, so third-party output plugins will fail to initialize until explicitly added.
#4
At the time of writing the vulnerability is not known to be exploited in the wild, however, a public proof-of-concept reproducing the full replication-role-to-superuser chain is available, which raises exploitation likelihood. Patch to a fixed release, revoke unnecessary REPLICATION privileges, restrict replication access to known hosts, and rotate replication credentials given the twelve-year exposure window.

Vulnerability

CVE IDAffected ProductsAffected CPECWE ID
CVE-2026-6471PostgreSQL core server before 18.6, 17.11, 16.15, 15.19, and 14.24cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*CWE-862

Recommendations

01
Patch to a Fixed Release Immediately

Upgrade affected instances to PostgreSQL 18.6, 17.11, 16.15, 15.19, or 14.24, or the equivalent distribution/managed-service package. Patch standby replicas first and schedule the primary restart around replication lag. Where PostgreSQL is a managed service, confirm the provider applied the engine patch.

02
Prepare for the Post-Patch Plugin Allow-List

The fix introduces an allow-list of permitted output plugins that by default admits only the two plugins shipped with PostgreSQL. Inventory plugins in use via the replication-slots view before updating, then add each required third-party plugin to the allow-list and reload the configuration.

03
Inventory and Reduce the REPLICATION Population

Enumerate every role carrying the REPLICATION attribute and assign each an owner and a purpose; revoke the attribute from any role not actively driving a replica, connector, or backup job. Remember that superuser implies replication capability and warrants the same scrutiny.

04
Tighten Replication Access and Network Egress

Scope every replication entry in host-based authentication to the exact source addresses of legitimate consumers, prefer strong password authentication wrapped in TLS, and eliminate broad-CIDR or trust entries. Block outbound SMB and NFS traffic from database servers as a compensating control.

05
Rotate Replication Credentials and Hunt Retroactively

Treat any replication credential stored in connector configurations, container secrets, or CI variables as potentially exposed over the flaw’s twelve-year lifetime, rotate those credentials after patching, and move them into a managed secret store. Hunt for the database backend process spawning shells or interpreters, and for replication-slot plugin names containing path separators.


Potential MITRE ATT&CK TTPs

Initial Access
T1078: Valid Accounts
Execution
T1129: Shared Modules
T1059: Command and Scripting Interpreter
Privilege Escalation
T1068: Exploitation for Privilege Escalation
Defense Evasion
T1556: Modify Authentication Process

Patch Link


References

What Next?

At Hive Pro, it is our mission to detect the most likely threats to your organization and to help you prevent them from happening.

Reduce real exposure. Not just vulnerability volume.