PostgreSQL is an open source database based on the POSTGRES database management system. It includes several contributed scripts including the make_oidjoins_check script.
The make_oidjoins_check script insecurely creates temporary files in world-writeable directories with predictable names.
A local attacker could create symbolic links in the temporary files directory, pointing to a valid file somewhere on the filesystem. When make_oidjoins_check is called, this would result in file overwrite with the rights of the user running the utility, which could be the root user.
There is no known workaround at this time.
All PostgreSQL users should upgrade to the latest version:
# emerge sync
# emerge -pv ">=dev-db/postgresql-7.4.5-r2"
# emerge ">=dev-db/postgresql-7.4.5-r2"
Upgrade notes: PostgreSQL 7.3.x users should upgrade to the latest available 7.3.x version to retain database compatibility.