A flaw was found in ansible-collection-redhat-leapp. When a remediation task is executed with elevated privileges and the leapp_old_postgresql_data option is selected, a PostgreSQL data backup archive is created with insecure permissions. This allows a local non-root user on the managed node to read sensitive archived PostgreSQL data, leading to information disclosure.
To mitigate this issue, ensure that the directory used for PostgreSQL data backups and the resulting archive have restrictive permissions. Administrators should configure their Ansible playbooks or manually adjust permissions to ensure the backup directory (e.g., /var/backups/leapp) is owned by root with 0700 permissions, and the backup archive itself has 0600 permissions. This prevents unauthorized local users from accessing sensitive PostgreSQL data. If the current task must be used as-is, restrict local-user access on affected systems and remove or re-permission the generated backup archive immediately after it is created. Always warn if there is a potential for reload and restarts.