Service:
postgres
Protocol:
TCPPort:
5432Used for:
PostgreSQL database accessWhy It’s Open
Popular SQL database for modern web stacks, analytics tools, and custom apps.
Common Risks
- Exposed Without Auth
- Brute Force or Credential Stuffing
- Command Execution via Extensions (if unprotected)
Want to save time on reporting?
Let PentestPad generate, track, and export your reports - automatically.

Enumeration & Testing
Check if open
nmap -p 5432 -sVTesting
psql -h -U -c "\l"
psql -h -U -c "\dt"
psql -h -U -c "SELECT * FROM pg_user;"What to Look For
| Checkpoint | What it means |
|---|---|
| Remote access allowed | Should be internal-only |
| Passwords stored in plain config | Major risk |
Known Exploits
- CVE-2018-1058 PostgreSQL before 10.3 allows remote attackers to execute arbitrary SQL commands via a crafted request.
- CVE-2017-7546 PostgreSQL before 9.6.4 allows remote attackers to execute arbitrary SQL commands via a crafted request.
Mitigation
- Use pg_hba.conf to limit access.
- Set strong passwords.
- Use SSL for remote connections.
- Monitor login attempts.
TL;DR
- Service: PostgreSQL (Relational database)
- Default Port: 5432
- Risks: SQL injection, unauthorized access
- Mitigation: Enforce strong authentication, restrict access, keep software updated