Security misconfiguration: the settings everyone forgets
Day 20 of our web security series: default passwords, debug pages, open storage and the other settings that quietly undo good code, and how to keep them in check.
The last three days were about code: validating input, using parameterised queries and encoding output. But a site can have carefully written code and still be wide open, because of a setting.
That’s security misconfiguration, number two on the current OWASP Top 10. It isn’t one bug. It’s a family of small oversights in how servers, frameworks, cloud services and tools are set up. None of them look dramatic. Together they cause a large share of real breaches.
Why it happens
Software is usually shipped to be easy to start with, not safe by default. Sample accounts, helpful error pages and open permissions make the first hour pleasant. Then the project goes live and nobody goes back to change them.
Settings also drift. Someone opens a port to debug a problem and forgets to close it. A test storage bucket is made public for a demo. A new server is set up by hand, slightly differently from the old one. Over months, the gap between “how we think it’s set up” and “how it really is” grows.
Why it matters for security
Misconfigurations are attractive because they’re easy to find and easy to use. Automated scanners sweep the internet constantly for admin pages with default passwords, open databases and exposed files. An attacker doesn’t need skill or a clever bug, just a list of common mistakes and patience. And because the system is “working as configured”, the access often looks legitimate in the logs.
The usual suspects
Default and shared passwords
Admin panels, databases, routers, CMS installs and monitoring tools often ship with a default login, or are set up with a simple one “for now”. Change every default before anything goes live, use unique passwords, and turn on two-factor login for every admin interface (Day 12).
Debug mode left on
Frameworks have a development mode that shows detailed errors, stack traces, configuration values and sometimes an interactive console. Brilliant on a laptop, dangerous in production. Make sure production always runs in production mode, and that error pages are plain messages (Day 7’s checklist again).
Detailed error messages
Even without debug mode, error pages and API responses can reveal file paths, software versions, database errors and internal hostnames. Log the details for your team; show visitors a short, friendly message.
Files that shouldn’t be public
Backup files, .env files containing passwords and API keys, .git folders, old copies of the site, database dumps and log files sometimes end up inside the public web folder. Anything in that folder may be downloadable. Keep secrets and backups outside it, and block access to hidden files and folders.
Directory listing
If a folder has no index page, some servers show a list of every file in it. Turn directory listing off so visitors only see what you’ve chosen to publish.
Open cloud storage and databases
Storage buckets, search clusters and databases are regularly found open to the whole internet with no password, sometimes holding millions of records. Default to private, give access through your application, and check your cloud provider’s security dashboard for public resources.
Unnecessary features and services
Every installed plugin, sample application, open port and enabled feature is something that can be misconfigured or go out of date. If you don’t use it, remove it. This also includes old admin tools, test pages and unused API endpoints.
Missing security headers
HTTPS settings, Strict-Transport-Security, framing rules and a Content Security Policy are all configuration. We met some in week one; Day 22 covers them properly. A missing header won’t break your site, which is exactly why it’s easy to forget.
Overly loose permissions
Cross-origin rules that allow any site (Day 6), cloud roles with full admin rights, file permissions that let the web server write anywhere: all are settings that grant more than needed. Apply least privilege (Day 13) to configuration too.
How to keep configuration under control
Write it down as code. Where you can, describe servers, cloud resources and app settings in files that live in version control, rather than clicking through dashboards. Then every environment is set up the same way, every change is reviewed, and you can see what changed and when.
Have a hardening checklist. For each type of system you run (web server, database, CMS, cloud account), keep a short list of the settings that must be changed from default. Use it every time you set one up.
Separate environments. Development, testing and production should have different passwords, keys and settings. Never reuse production secrets in a test environment.
Scan regularly. Free tools like securityheaders.com and SSL Labs check your public setup in seconds. Cloud providers include tools that flag public storage and risky settings. Run them after every significant change and on a schedule.
Review after incidents and changes. When you open something temporarily to fix a problem, put a reminder in the calendar to close it.
What you can do today
If you use websites and devices:
- Change the default password on your home router and any smart devices, and keep their firmware updated.
- Turn off features you don’t use, such as remote management on your router.
- Be wary of sites that show technical error pages; they’re often a sign of wider neglect.
If you run a website:
- Change every default password and enable two-factor login on all admin panels.
- Confirm production runs with debug mode off and shows plain error pages.
- Check that
.env, backup, log and.gitfiles can’t be downloaded, and turn off directory listing. - Review cloud storage and databases for anything public that shouldn’t be.
- Remove unused plugins, sample apps and services, then run securityheaders.com and keep a hardening checklist. The OWASP Top 10 entry on security misconfiguration has more examples.
Coming up next
On Day 21 we look at the code you didn’t write: vulnerable dependencies, and how to keep the libraries and plugins your site relies on up to date.