Check reference

Exposed sensitive files

What it checks

Checks whether files such as .env, .git, wp-config.php backups, SQL dumps, debug.log and phpinfo pages can be downloaded from the site.

Check ID: external.exposed_files

The files listed in the table below are requested at the top of each checked URL (debug.log in the wp-content folder). A file is reported only when the response is 200 and its content looks like that kind of file, so an error page that returns 200 is not reported.

The list is bundled in data/sensitive-paths.json. If the site cannot be reached, one Info finding is shown per scan and the previous results are kept.

What a finding means

The titles, severities and explanations below are the ones shown on the Findings screen.

FindingSeverityMeaning
Publicly accessible: .env, .env.local, .env.production
exposed.env
Files: .env, .env.local, .env.production
CriticalAn environment file is downloadable. It usually contains database passwords and API keys.
Publicly accessible: .git/HEAD, .git/config, .svn/wc.db …
exposed.vcs
Files: .git/HEAD, .git/config, .svn/wc.db, .hg/requires
HighVersion control data is downloadable. Attackers can rebuild your source code, including configuration and credentials committed in the past.
Publicly accessible: wp-config.php.bak, wp-config.php.old, wp-config.php.orig …
exposed.config_backup
Files: wp-config.php.bak, wp-config.php.old, wp-config.php.orig, wp-config.php.save, wp-config.php~, wp-config.php.txt, wp-config.bak, .wp-config.php.swp
CriticalA backup of wp-config.php is served as plain text, revealing the database password and security keys.
Publicly accessible: debug.log, error_log, php_errorlog
exposed.log
Files: debug.log, error_log, php_errorlog
High MediumA PHP error log is downloadable. Logs reveal file paths, plugin names and sometimes personal data.
Publicly accessible: phpinfo.php, info.php
exposed.phpinfo
Files: phpinfo.php, info.php
HighA phpinfo() page is public. It shows the PHP version, extensions, paths and environment variables.
Publicly accessible: backup.sql, dump.sql, database.sql …
exposed.sql
Files: backup.sql, dump.sql, database.sql, db.sql, wordpress.sql
CriticalA database dump is downloadable. It can contain user accounts, password hashes and customer data.
Publicly accessible: backup.zip, site.zip, wordpress.zip …
exposed.archive
Files: backup.zip, site.zip, wordpress.zip, backup.tar.gz
HighA backup archive is downloadable. It may contain the whole site including wp-config.php.
Publicly accessible: .htpasswd
exposed.credentials
Files: .htpasswd
HighA password file is downloadable. Password hashes can be cracked offline.
Publicly accessible: .DS_Store
exposed.listing
Files: .DS_Store
LowA .DS_Store file is downloadable. It reveals the names of files in the directory.
Publicly accessible: composer.lock, package-lock.json
exposed.manifest
Files: composer.lock, package-lock.json
LowA dependency lock file is downloadable. It lists exact package versions, which helps attackers find known vulnerabilities.
Publicly accessible: .user.ini
exposed.config
Files: .user.ini
LowA file that should not be public can be downloaded.
The site could not be reached for the external check
external.unreachable
InfoThe request failed: …. Previous results of this check are kept until the site can be checked again.

How to fix

The recommended action shown with each finding:

  • Publicly accessible: .env, .env.local, .env.production, Publicly accessible: .htpasswd, Publicly accessible: .DS_Store, Publicly accessible: .user.ini
    Delete the file from the public directory, or block access to it in the server configuration. Change any passwords or keys it contains.
  • Publicly accessible: .git/HEAD, .git/config, .svn/wc.db …
    Remove the .git/.svn/.hg directory from the public directory or deny access to it, then rotate any credentials found in the repository history.
  • Publicly accessible: wp-config.php.bak, wp-config.php.old, wp-config.php.orig …
    Delete the backup file, change the database password and regenerate the security keys in wp-config.php.
  • Publicly accessible: debug.log, error_log, php_errorlog
    Delete the log, and write logs outside the public directory (set WP_DEBUG_LOG to a private path).
  • Publicly accessible: phpinfo.php, info.php
    Delete the file after use.
  • Publicly accessible: backup.sql, dump.sql, database.sql …
    Delete the dump immediately, store backups outside the public directory, and treat the data as leaked.
  • Publicly accessible: backup.zip, site.zip, wordpress.zip …
    Delete the archive and keep backups outside the public directory.
  • Publicly accessible: composer.lock, package-lock.json
    Block access to lock files or move them outside the public directory.
  • The site could not be reached for the external check
    Some hosts block requests from the server to itself (loopback). If the site works for visitors, ask your host to allow loopback requests or disable this check.

Related settings

  • Settings → Checks → Enabled checks: switch “Exposed sensitive files” on or off.
  • Settings → Targets → Additional URLs for external checks: other URLs on your own domain to check, in addition to the site address. The public URL of a registered directory is checked too.