Security Misconfiguration
Table of Contents
A broad classification covering insecure default configurations, unnecessary enabled features, verbose error output, missing hardening, and improperly configured security controls — where the vulnerability is not a coding flaw but an operational or deployment setting left in an insecure state. The common thread: the fix is a configuration change, not a code change.
Distinct from CORS Misconfigurations (a specific header-level subtype with its own note), Default Software Configuration (unchanged vendor/default credentials or settings — a narrower, credential- focused subset), and Outdated Software (a patching problem, not a configuration problem). Security Misconfiguration is the catch-all for everything else in this space: the general category, not a specific mechanism.
Related: CORS Misconfigurations HTTP Security Headers PT1 Vulnerability Classification Cheat Sheet Web Application Testing Methodology Vulnerability Scanning Tools Vulnerability Identification Techniques
1. Identification
Security Misconfiguration is found by systematically checking what's exposed, enabled, or verbose that shouldn't be — it rarely shows up from a single test, but from a checklist pass across the target.
Verbose Error Messages / Stack Traces
# Trigger an error deliberately and inspect the response curl "http://$IP/api/product?id=' " -i curl "http://$IP/nonexistent-endpoint-xyz" -i # Look for: stack traces, file paths, framework version strings, # SQL error text, internal hostnames
A stack trace or framework error page in the response body is itself a finding (Information Disclosure) and often a stepping stone to a more specific vulnerability (it may reveal the exact library version to target with a known CVE).
Directory Listing Enabled
curl http://$IP/uploads/ -i curl http://$IP/backup/ -i curl http://$IP/assets/ -i # An "Index of /" response or a raw file listing confirms # directory listing is enabled
Default / Sample Applications and Admin Interfaces Left Deployed
# Common leftover paths from default installs for path in /phpinfo.php /admin /manager/html /solr/admin \ /examples /test /.git/ /.env /wp-admin; do curl -s -o /dev/null -w "%{http_code} $path\n" http://$IP$path done
Unnecessary HTTP Methods Enabled
curl -X OPTIONS http://$IP/api/users -i # Look for PUT, DELETE, TRACE in the Allow header if not required # by application functionality curl -X TRACE http://$IP/ -i # TRACE enabled can assist XST attacks
Cloud Storage Misconfiguration
# Publicly readable/writable S3 buckets or equivalent aws s3 ls s3://bucket-name --no-sign-request curl -s https://bucket-name.s3.amazonaws.com/ -i
Missing Security Headers
See HTTP Security Headers for the full header-by-header methodology — CSP, X-Frame-Options, HSTS, and X-Content-Type-Options are all part of this broader category and each missing header is an independent, reportable finding.
2. Exploitation
Security Misconfiguration findings are rarely exploited in isolation — their value is usually as a stepping stone:
- A verbose error revealing a framework version leads to an Outdated Software / Using Components with Known Vulnerabilities finding
- Directory listing on a backup folder leads to exposed source code or credentials (chain into SQL Injection or Insecure Authentication Mechanism)
- An exposed
.git/directory allows full source reconstruction:
# Dump an exposed .git directory wget -r -np -R "index.html*" http://$IP/.git/ cd $IP/.git && git checkout . # Now review the full source tree offline
- An exposed
.envfile often contains database credentials, API keys, or session secrets directly:
curl http://$IP/.env
3. Bypass Techniques
Not generally applicable — this category is about absence of hardening rather than a mechanism to defeat. The relevant "bypass" is usually WAF/filter evasion when probing for exposed paths:
# Case and encoding variation if a path returns 403 via a naive filter curl http://$IP/.ENV -i curl http://$IP/%2e%65%6e%76 -i
4. Testing Methodology / Checklist
[ ]Trigger errors on multiple endpoints; check for stack traces or verbose framework output[ ]Check for directory listing on common paths (/uploads/,/backup/,/assets/,/files/)[ ]Probe for leftover default/sample apps and admin interfaces[ ]Check.git/,.env,.DS_Store,web.config.bakand similar backup/metadata exposure[ ]Enumerate allowed HTTP methods with OPTIONS; test unnecessary methods (PUT, DELETE, TRACE)[ ]Check cloud storage buckets for public read/write if in scope[ ]Cross-check missing security headers — see HTTP Security Headers[ ]Note server/framework version strings from headers or error pages for later cross-reference against known CVEs
5. Reporting Template
Classification: Security Misconfiguration
Severity: Informational to High — severity depends entirely on
what the misconfiguration exposes. A verbose error is typically
Low/Informational; an exposed .env with live credentials is High;
an exposed .git/ directory revealing hardcoded secrets can be
Critical depending on what those secrets grant access to.
Description:
The application at [endpoint/path] exposes [verbose error output
/ directory listing / a default administrative interface / an
unnecessary HTTP method / a backup or metadata file] that should
not be accessible in a production deployment. This does not
directly grant access but [describe what it discloses or enables].
Evidence:
[Raw request/response showing the exposure — e.g. the directory listing HTML, the stack trace content, or the contents of the exposed file with sensitive values redacted in the report]
Remediation:
- Disable verbose error output in production; return generic error pages and log details server-side only
- Disable directory listing at the web server configuration level
- Remove default/sample applications and unused admin interfaces before deployment
- Restrict HTTP methods to only those required by the application
- Exclude
.git,.env, and other metadata/config files from the web root, or block them explicitly at the server/proxy level - Apply security headers per a documented baseline (see HTTP Security Headers note) and review as part of the deployment pipeline, not as an afterthought
Tips
- This category is a checklist exercise, not a single technique — budget time for it early in recon rather than treating it as an afterthought once other findings are exhausted
- Always check
.git/and.envexposure specifically — they are quick to test and disproportionately high-impact when present - A verbose stack trace is worth reading carefully even after you've logged it as a finding — it frequently names the exact library and version, which is your fastest route into an Outdated Software / Known Vulnerabilities finding
- On the exam, don't lump multiple distinct misconfigurations into
one finding — a missing header, an exposed
.git/, and enabled directory listing are three separate reportable issues even if found on the same host - Resist the urge to classify everything unfamiliar as Security Misconfiguration by default — check the disambiguation table in the PT1 Vulnerability Classification Cheat Sheet first; a misconfigured CORS header is CORS Misconfigurations, not this