Default credentials
| Class | Authentication |
|---|---|
| Also known as | Default passwords, default accounts, factory passwords |
| CWE | CWE-1392: Use of Default Credentials |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1078.001 Valid Accounts: Default Accounts |
| Typical severity | High |
| Affects | Admin dashboards, databases, monitoring tools and devices installed with the account their maker set up |
A new Grafana server lets its first administrator sign in with the user name admin and the password admin.1 The pair is printed in the product's documentation, so it opens every copy where nobody changed it. Default credentials are user names, passwords or keys of this kind: chosen by the maker, the same on each installation, and still valid after setup.2 An attacker looks the password up on the public internet and tries it on systems that answer from it.3
How a shared password becomes public
Testers find the pair in the maker's manual or with a search engine.4 Where no published pair exists, the guessing starts with a short set of names (admin, administrator, root, guest, test) and passwords such as an empty field, password or admin, or the product's own name in both fields.4 Because the value is identical everywhere, one known pair opens the same product at many organisations within a short time.2
Defaults survive for four common reasons: staff who keep the default for convenience, developers who leave a test back door, products whose default account cannot be removed, and products that never make the user change the password after the first sign-in.4 Years of asking thousands of customers to change the password have not fixed the problem, and in December 2023 the US cybersecurity agency CISA called on makers to remove default passwords from all products.3
The same weakness appears inside an application when it gives new accounts a generated starting password with a predictable shape. Testers create several accounts in a row and compare what they receive; if the passwords follow a pattern, and user names run in sequence such as user7811, the accounts can be guessed before their owners sign in.4
Where defaults sit in a web stack
Grafana's admin_password setting has the default admin and is set once, on the first run.5
The official Postgres container image requires POSTGRES_PASSWORD, the superuser password, and does not accept an empty value. The example Docker Compose file (a file that starts several containers together) on the same page sets it to example, so a copy of that file used unchanged starts a database whose superuser password is example. Setting POSTGRES_HOST_AUTH_METHOD to trust lets anyone connect with no password at all. The variables take effect only on an empty data directory, so changing them later leaves an existing database with its old password.6
Self-hosted Supabase ships a .env.example file of placeholder passwords and keys, and its documentation says never to start the stack with them. The Studio dashboard sits behind HTTP basic authentication with the user and password from DASHBOARD_USERNAME and DASHBOARD_PASSWORD; the quick-start script fills in random values.7
Platforms have default accounts of their own: the root user of an AWS account, the default service account in Kubernetes, the Administrator and Guest accounts in Windows. Some are created later, by an integration: connecting an ESXi host to vCenter adds a privileged account called vpxuser to the host.8
Mirai
On 20 September 2016 the Krebs on Security blog was hit by a botnet attack of more than 620 gigabits per second. The malware behind it, Mirai, scanned the internet for home routers, network cameras and video recorders and tried a list of 62 common default user names and passwords on each one. That short list was enough to take over hundreds of thousands of devices; the presumed author claimed more than 380,000 for this attack. A Mirai attack on the French host OVH later that month reached at least 1.1 terabits per second. A reboot removed the malware from memory, but a device reconnected before its password was changed could be infected again.9
The intrusions behind CISA's alert reached programmable logic controllers (industrial computers that drive equipment) in systems that provide public services in the United States. The controllers shipped with a four-digit password set by the maker, and the password had been posted on open forums.3 Exposed administration interface describes the case.
Designs without a shared password
Three designs replace a single password printed in every copy: a setup password unique to each unit, a setup password that expires once setup is finished and moves the owner to stronger sign-in such as phishing-resistant MFA, and a first setup that requires physical access to the device.3 Since 29 April 2024, United Kingdom law requires the passwords of connectable products to be unique per product or set by the user. A unique password may not come from an incrementing counter (password1, password2), from public information, or from a serial number unless it is derived with a keyed hash or encryption.10
For a web application the user-defined form is a first-run screen that asks the person installing it to create the administrator, so no shared value exists to leak.
Checking an installation
List every component that has a sign-in: dashboards, database tools, monitoring, the database itself, SSH and any device on the network. For each one, look up its documented default and confirm that it no longer works. Repeated wrong guesses can trip an Account lockout policy and lock the real administrator out, and sign-in pages that report which user names exist make the search easier for an attacker (Account enumeration).4 Change each default after installation and before the system reaches production, and add a second factor to default accounts that stay.8
For Grafana, set the administrator before the first start, either in the [security] section or with environment variables, or turn off the built-in account with disable_initial_admin_creation:5
# read once, on the first start
GF_SECURITY_ADMIN_USER=owner
GF_SECURITY_ADMIN_PASSWORD=<a long random value from a password manager>In logs, sign-ins as root over SSH with a password, or as admin on a router or firewall, are the patterns to watch.8 SSH brute-force attack and Password spraying describe the guessing that follows when a default has been changed to another weak value.
Prompt for a coding agent
List every service in this project and its deployment files that has a login or a password: docker-compose files, .env and .env.example files, Grafana, database containers, admin dashboards and anything started from an example config. For each one, find values that came from the documentation or an example file, such as "admin", "example", "password", "changeme" or an empty password, and any database set to trust authentication. Replace them with references to secrets that are generated per installation and read from the environment, and note where an existing database or data volume keeps the old password and has to be changed by hand. List each file, the value you found and what you changed.
In SecFlash
SecFlash reports a database tool, server manager or back-office login that answers from the internet as SF-SEC-310, and databases, admin panels and remote logins on open ports as SF-SEC-302, both on the Security page. On the server SecFlash is installed on, SF-SRV-101 on the Server page reports a private service, such as a database, that answers from the internet.
See also
- Exposed administration interface
- Brute-force attack
- Credential stuffing
- Exposed credentials in source code repositories
- Multi-factor authentication
- Principle of least privilege
- Category: Authentication
References
- back "Sign in to Grafana". Grafana documentation. Grafana Labs.
- a b MITRE (CWE 4.19, 11 December 2025). "CWE-1392: Use of Default Credentials". Common Weakness Enumeration.
- a b c d CISA (15 December 2023). "Secure by Design Alert: How Manufacturers Can Protect Customers by Eliminating Default Passwords". cisa.gov.
- a b c d e OWASP Foundation. "Testing for Default Credentials" (WSTG-ATHN-02). Web Security Testing Guide v4.2.
- a b "Configure Grafana". Grafana documentation. Grafana Labs.
- back "postgres: Docker Official Image". Docker Hub. Docker.
- back "Self-Hosting with Docker". Supabase Docs. Supabase.
- a b c MITRE (version 2.0, modified 12 May 2026). "Valid Accounts: Default Accounts, Sub-technique T1078.001". MITRE ATT&CK.
- back US-CERT (14 October 2016, revised 17 October 2017). "Heightened DDoS Threat Posed by Mirai and Other Botnets" (TA16-288A). cisa.gov.
- back The Product Security and Telecommunications Infrastructure (Security Requirements for Relevant Connectable Products) Regulations 2023 (SI 2023/1007), Schedule 1 and regulation 1. legislation.gov.uk.