Protect.Computer
NEWS

PostgreSQL Patches 12-Year-Old Flaw Enabling Replication RCE

· 1 min read · Malicious byte
PostgreSQL Patches 12-Year-Old Flaw Enabling Replication RCE

PostgreSQL has patched CVE-2026-6471 (CVSS 7.2), a 12-year-old vulnerability in its logical decoding subsystem that lets a database account with the REPLICATION privilege execute arbitrary code at the operating-system level. The flaw exists because the plugin name supplied to a CREATE_REPLICATION_SLOT command is passed directly to the library loader — no path restriction, no allowlist — allowing an attacker who controls a replication-role account to specify any library file visible to the database server process, including attacker-controlled ones reachable over SMB (Windows) or NFS (Linux/macOS). Researchers at Cyera dubbed the technique “PostGREShell.”

The patched releases introduce an output_plugin_libraries parameter that whitelists which logical decoding plugins the server will load, defaulting to only the two built-in plugins (pgoutput and test_decoding). No public proof-of-concept exploit exists as of September 4, 2026, and the vulnerability does not appear in CISA’s Known Exploited Vulnerabilities catalog — but the fix has been publicly available since August 13, leaving a narrowing window before someone publishes working exploitation code. The vulnerability was discovered by Vladimir Tokarev and Yu Kunpeng.

How to check if you’re affected

Affected versions include PostgreSQL 14.23 and earlier, 15.18 and earlier, 16.14 and earlier, 17.10 and earlier, and 18.5 and earlier. Run SELECT version(); inside psql to confirm your version. Exploitation requires wal_level = logical in postgresql.conf and a user account holding the REPLICATION attribute — check SELECT rolname, rolreplication FROM pg_roles WHERE rolreplication; to see which accounts are at risk. If you run managed PostgreSQL (AWS RDS, Azure Database, Supabase, Neon), your provider controls patching; check their advisories for the patch rollout schedule.

Sources

Related reading