PostgreSQL
PostgreSQL dblink and subscriptions can append to arbitrary files
External control of file name in PostgreSQL dblink and CREATE/ALTER SUBSCRIPTION allows a user to achieve persistent denial of service, via 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 "sslkeylogfile" mechanism cannot add arbitrary bytes. Within major version 18, minor versions before PostgreSQL 18.7 are affected. Versions before PostgreSQL 18 are also affected if libpq version 18 or later is installed and in use by the server.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 18, < 18.7
- >= 17, < 17.12
- >= 16, < 16.16
- >= 15, < 15.20
- < 14.25
Fixed in 18.7, 17.12, 16.16, 15.20, 14.25
Mitigation
Upgrade PostgreSQL to 18.7 or 17.12 or 16.16 or 15.20 or 14.25 or later.
Workaround
Revoke public EXECUTE permission on dblink functions
Revoke pg_create_subscription from any roles that do not already have pg_write_server_files privileges
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.