PostgreSQL Flaw Allows Replication-Privileged Attackers to Take Over Databases and Servers

Summary
Cyera says CVE-2026-6471, a flaw in PostgreSQL logical decoding, lets attackers with Replication privileges load files and gain code execution and superuser access. Versions 9.4–18 are affected; patches are available.
Key points
- Cyera identified CVE-2026-6471, which it calls PostGREShell; the flaw has a CVSS score of 7.2.
- The vulnerability affects PostgreSQL versions 9.4 through 18, according to Cyera, which confirmed it on version 18.2.
- An attacker with Replication privileges can supply a filesystem path as a logical decoding plugin name, leading PostgreSQL to load a file through dlopen().
- Loaded code runs with the PostgreSQL server process's privileges; Cyera says an attacker can use it to gain superuser access, execute OS commands, and establish persistence.
- Fixed versions are 18.6, 17.11, 16.15, 15.19, and 14.24.
- Organizations are advised to update PostgreSQL and audit Replication accounts, removing the attribute where it is not needed.
Article Details
- Vulnerability Types
- Missing authorization in logical decoding allows users with Replication privileges to load arbitrary files through a logical decoding plugin, resulting in remote code execution and privilege escalation.
- Severity
- CVSS 7.2
- Affected Versions
- PostgreSQL 9.4 through 18
- Exploitation Status
- unknown
- Exploit Availability
- unknown
- Patch Status
- available
- Workarounds
- Audit Replication accounts and remove the Replication attribute from accounts that do not need it.
MITRE ATT&CK
T1059 · Command and Scripting InterpreterAfter gaining superuser access, the attacker can execute OS commands.T1068 · Exploitation for Privilege EscalationAn attacker with Replication privileges can exploit the flaw to gain superuser privileges.T1505.003 · Web ShellThe article describes deploying a persistent backdoor that is reloaded into each new backend.
