← Port Encyclopedia
5432
PostgreSQL
TCP
Database Critical Risk
PostgreSQL — relational database, SQL injection, privilege escalation

🔍 How to Scan Port 5432

nmap -sV -p 5432 target
nmap -sV -sC --script=banner -p 5432 target
nc -zv target 5432

🛡️ Security Considerations

  • Scan port 5432 with nmap -sV to identify the exact service and version
  • If PostgreSQL is not needed, close or firewall this port immediately
  • Check for default credentials if a management interface runs on this port
  • Use searchsploit postgresql to find known exploits
  • Monitor traffic on port 5432 with Wireshark or tcpdump for anomalies
  • Ensure the service is patched to the latest version to prevent known CVE exploitation