Forgotten staging site exposes production database credentials
- Asset
staging-old.example.com- How found
- Certificate transparency logs, then a direct request
- Confirmed
- By hand, read-only. Nothing accessed beyond the file below.
Evidence
$ curl -s https://staging-old.example.com/.env APP_ENV=staging DB_HOST=prod-db-01.internal.example.com DB_USER=app_rw DB_PASS=xxxxxxxxxxxxxx
Why it matters
Anyone who finds this host can read credentials for the production customer database. We did not try them, so treat them as live until they are rotated. The host is missing from the asset inventory you gave us. Confirm who owns it and whether it receives patching and monitoring.
Fix
- Rotate the database password today.
- Take the staging host offline, or put it behind single sign-on.
- Review database logins from unfamiliar addresses since the certificate was issued.