Database Connections

Unencrypted connections, publicly accessible databases, default credentials, inline passwords, MongoDB/Redis/Elasticsearch without auth, pool limits, and SSL validation.

12 vulnerabilities

Unencrypted Database Connection

high

Your database connection doesn't use SSL/TLS, meaning all queries and results travel over the network in plaintext and can be intercepted.

CWE-319OWASP A02:2021

Database Publicly Accessible

critical

Your database is bound to 0.0.0.0 or exposed on a public IP without a VPC or firewall, making it directly reachable from the internet.

CWE-284OWASP A05:2021

Default Database Credentials

critical

Your database uses factory-default credentials like postgres:postgres, root:root, or admin:admin — the first thing any attacker tries.

CWE-1392OWASP A07:2021

Connection String with Inline Password

high

A database connection string with a plaintext password is hardcoded in your source code, committing your database credentials to version control.

CWE-312OWASP A02:2021

MongoDB Without Authentication

critical

Your MongoDB connection has no authentication credentials, allowing anyone who can reach the database port to read, modify, or delete all data.

CWE-306OWASP A07:2021

Redis Without Authentication

high

Your Redis instance has no password and is accessible beyond localhost, letting anyone who can reach it read all cached data, session tokens, and queue contents.

CWE-306OWASP A07:2021

Elasticsearch Publicly Accessible

critical

Your Elasticsearch instance is reachable from the internet without authentication, exposing all indexed data to anyone who knows the endpoint URL.

CWE-284OWASP A05:2021

No Connection Pool Limits

medium

Your database connection pool has no max connection limit, meaning a traffic spike or slow query can exhaust all available database connections and take your app down.

CWE-400

Missing Database Connection Timeout

medium

Your database connection has no timeout configured, so a slow or unresponsive database will hang your entire application indefinitely instead of failing fast.

CWE-400

Database Credentials in Environment Logs

high

Your DATABASE_URL or database password gets printed to application logs via console.log or error messages, exposing credentials to anyone with log access.

CWE-532OWASP A09:2021

Missing Database SSL Certificate Validation

high

Your database SSL connection uses rejectUnauthorized: false, which encrypts traffic but doesn't verify the server's identity, leaving you open to man-in-the-middle attacks.

CWE-295OWASP A02:2021

Hardcoded Database Host in Source

medium

Your database hostname and port are hardcoded in source code instead of environment variables, exposing your infrastructure topology and making deployments inflexible.

CWE-547