Skip to content

Database credentials visible in the client

Scan rule · RSC-SEC-030

  • Security
  • Severity: Critical
  • CWE-798
  • OWASP A07-2021

Finds connection strings with embedded username and password in HTML or bundles.

Why this matters

A connection string carries host, user and password in one line. Shipped in client code, the database becomes directly reachable — without the app, without a login, bypassing every application-level rule.

The usual path: a generator creates a database helper that belongs on the server and imports it into a client component. The bundler takes the value along; in the browser nothing looks broken.

Immediate action: rotate the database password — the old credentials must be treated as compromised. Then move access behind a server endpoint and read the string exclusively from the server environment.

Scan tier

  • External scan (anonymous)

How to fix it

Move credentials into server-side environment variables and rotate the database password.

Scan your own app for free