CVE-2026-139820: Relative path traversal in AWS postgresql-logfdw
Relative path traversal in the foreign table file name validation in the AWS postgresql-logfdw (logfdw) extension before version 1.5 allows an authenticated non-superuser user who has been granted logfdw privileges to read files outside the configured log directory via a crafted foreign table file name. The user can only read files that the database server process has permission to read.
To remediate this issue, users should upgrade to version 1.5 or later and recreate or alter any foreign table whose file name is not a plain file name in the log directory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.5 - Operational
Recreate or alter any foreign table whose file name is not a plain file name in the log directory.
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated, non-superuser database user can exploit it only if they have been granted log_fdw privileges. The issue affects deployments using a version of the extension earlier than 1.5.
What data could be exposed?
A successful exploit can read files outside the configured log directory by using a crafted foreign-table file name. Exposure is limited to files that the database server process itself is permitted to read.
Is upgrading alone sufficient to remediate the issue?
Upgrade postgresql-logfdw to version 1.5 or later. Also recreate or alter any foreign table whose file name is not a plain file name in the configured log directory.
What can be done if an upgrade cannot be applied immediately?
Limit or remove log_fdw privileges from non-superuser users, since those privileges are required for exploitation. Review foreign tables and avoid file names that are not plain names within the configured log directory.