Metasploit msfdb init creates insecure PostgreSQL trust auth and world-accessible socket (CVE-2026-132038)
Rapid7 Metasploit Framework before 6.5.10 has an improper access control issue in the msfdb database initialisation component. When a PostgreSQL cluster is initialised via msfdb init, it is configured with trust authentication and a world-accessible Unix domain socket in /tmp. Any local user can authenticate as the passwordless postgres superuser and execute arbitrary OS commands as the msfdb owner. Fixed in 6.5.10.
Rapid7 Metasploit Framework versions prior to 6.5.10 contain an Improper Access Control vulnerability in the msfdb database initialisation component. When a PostgreSQL cluster is initialised via msfdb init, it is configured with trust authentication and a world-accessible Unix domain socket in /tmp. This allows any local user on the same host to authenticate as the passwordless postgres superuser and execute arbitrary operating system commands as the msfdb owner.
The issue is fixed in Metasploit Framework 6.5.10. See the NVD entry and the fix PR. No in-the-wild exploitation is indicated in the provided evidence, but the insecure default configuration should be treated as a local privilege escalation risk on any host running msfdb init.
What to do 1. Upgrade Rapid7 Metasploit Framework to version 6.5.10 or later. 2. Review any existing PostgreSQL clusters initialised with msfdb init for trust authentication in pg_hba.conf and for world-accessible socket permissions in /tmp. 3. Reconfigure or re-initialise the msfdb database to use strong authentication (e.g., md5 or scram-sha-256) and restrict the Unix socket directory to the owning user. 4. Audit local users on affected hosts for signs of unauthorised access or commands executed as the msfdb owner. 5. Verify the vendor advisory and NVD entry before making production changes.