Safeguard
Application Security•

ASVS 5.0 V13.2.3: Never Use Default Credentials Between Services

ASVS 5.0 V13.2.3 (Level 2): service credentials must not be defaults like admin/admin. How to find them in configs, images and running systems.

Safeguard Security Team
2 min read

ASVS 5.0 V13.2.3 requires that when a credential is used for service authentication, the consumer does not use a default one such as root/root or admin/admin. It is a Level 2 requirement.

Default credentials are published in vendor manuals and in every attacker's wordlist. They are tried first.

Why it matters

Databases, message brokers, dashboards and admin consoles ship with well known accounts. Internet scans find exposed ones within hours of deployment. Inside a network the same accounts let an intruder move laterally without any exploit.

How to implement it

  1. Change or disable every vendor default at install time, in code, not by hand.
  2. Generate a random unique secret per environment and inject it from a secret store.
  3. Fail the deployment if a known default is detected.

A Docker Compose file that refuses to start without a supplied secret:

services:
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set}

The :? form aborts when the variable is empty. Do not give it a fallback such as changeme.

How to test it

Search for common defaults in repos, Helm values, Compose files and images:

grep -rniE "(password|passwd|secret)\s*[:=]\s*[\"']?(admin|root|password|changeme|test|guest)[\"']?" .

Then try the vendor default account against each running service in a test environment. Secret scanning in CI catches many of these before merge.

Click through it at your own pace, or open it full screen.

Common mistakes

  • Defaults left in dev and staging that share a network with production.
  • The same "strong" password reused across every environment.
  • Disabling the default account in the UI but leaving it in the bootstrap script.

Quick check

Is a generated password that is identical in all environments fine?

No. Each environment should have its own unique secret, so a leak in one does not open the others.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.