Endpoint Vulnerability

PostgreSQL: pg_upgrade creates file of sensitive metadata under prevailing umask


pg_upgrade creates file in current working directory containing the output of `pg_dumpall -g` under umask which was in effect when the user invoked pg_upgrade, and not under 0077 which is normally used for other temporary files. This can allow an authenticated attacker to read or modify the file, which may contain encrypted or unencrypted database passwords. The attack is unfeasible if a directory mode blocks the attacker searching the current working directory or if the prevailing umask blocks the attacker opening the file.

Affected Products