Skip to content
Info disclosure Disclosed report Beginner

███████ - Publicly Accessible public_html Directory Exposing WordPress Configuration

A publicly accessible directory exposed a zip file containing WordPress configuration files with database credentials, authentication keys, and API secrets. An attacker could download this file to obtain sensitive information and potentially compromise the database or source code.

xgoon Follow

Originally disclosed on HackerOne

Medium 5.7 View original
  • Triaged in 3 days
  • Fixed in 2 months
  • Disclosed after 11 months

Summary by the program

A security researcher discovered a publicly accessible directory containing sensitive WordPress configuration files, including database credentials, authentication keys, and API secrets. The vulnerability allowed unauthorized access to critical system information through a downloadable zip file. The exposure posed significant risks including potential database compromise and source code disclosure. The security team successfully validated the report, coordinated with the appropriate remediation team, and confirmed the vulnerability was resolved through retesting. We appreciate the responsible disclosure of this information security issue, which helped strengthen our overall security posture.

The original report as published on HackerOne, by xgoon. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is a host under *.royalcanin.ca, and the feature at issue is a public_html directory that was reachable from the internet. The researcher, xgoon, found that the directory exposed WordPress configuration files. The program's summary describes the contents as database credentials, authentication keys and API secrets, and says the material was obtainable through a downloadable zip file.

The report does not include the URL that was requested, the name of the zip file, or any request or response. There is no reproduction detail beyond the description above, so the sequence is simply: the directory was publicly accessible, a zip file inside it could be downloaded, and that archive contained the WordPress configuration material.

The program validated the report, passed it to the remediation team, and confirmed the fix by retesting. The severity is medium with a CVSS score of 5.7, and the weakness is classified as information disclosure. No bounty amount is recorded.

Root cause

The directory was publicly reachable and contained a downloadable zip archive holding WordPress configuration material. A WordPress installation keeps its database name, user, password, and the salts and keys used for cookie and nonce signing in wp-config.php. If an archive containing that file sits under the document root, anyone who can reach the path can fetch it. The report does not state which server software was involved or how the directory came to be exposed.

Impact

The program frames the exposure in terms of potential database compromise and source code disclosure. With working database credentials an attacker could read or modify site data, and with the authentication keys they could forge valid cookies and sessions. Source code disclosure would reveal the application's logic and any further secrets embedded in it. The report uses hedged language ("potential", "posed significant risks") and does not claim that any of this was actually carried out.

How this kind of bug works

Web servers map URL paths onto the filesystem. When a path resolves to a directory and directory listing is enabled, the server returns an HTML index of its contents; when it resolves to a file, the server returns the file, subject to its handler rules. Configuration files such as wp-config.php are normally protected because PHP is executed rather than served, so a request for the file runs it and produces no output. The protection disappears when a copy of the file exists in a form the server treats as static: a .zip, .tar.gz, .bak, .old, .txt or editor swap file. The same applies to a whole directory of source that was copied into the web root, for example a deployment artefact or a backup left behind after a migration.

Defences are layered: disable directory listing, keep archives and backups outside the document root, deny access to sensitive extensions and filenames at the server level, and rotate any secret that has been exposed.

How to test for it

  1. Map the application and note any paths that suggest archives or backups: /backup, /backups, /old, /tmp, /dev, /staging, /site.zip, /public_html, /www, and dated names such as backup-2024.zip.
  2. Request the directory itself without a trailing filename and observe whether the response is a generated file listing rather than a 403 or a custom error page.
  3. If listing is enabled, read the entries and request any archive or configuration-looking file. If listing is disabled, try common archive and backup names derived from the hostname and the application name.
  4. A positive result is a 200 response whose body is a real archive or a configuration file, not an HTML error page. Download the archive and confirm it contains configuration material; do not go further than needed to demonstrate the issue.
  5. Common false positives: a 200 status returned by a catch-all route or soft 404, an HTML page that merely mentions the filename, an empty directory listing, or a file that exists but is served as an error document. Check the content type and the first bytes of the body before concluding anything.

How it is fixed

Disable automatic directory indexing in the server configuration. Move backups, exports and deployment artefacts out of the document root, or block them with server rules that deny requests for archive and backup extensions and for dotfiles. Remove stale copies of wp-config.php and similar files. Because the material was exposed, rotate the database password and regenerate the WordPress salts and keys, then review logs for access to the affected paths.

Hunting notes

This class of bug hides where deployments leave residue: old document roots kept alongside new ones, migration folders, CMS backup plugins writing into upload directories, and hosts that serve user home directories. Recon signals worth watching are directory listings appearing in crawl results, archive extensions in URL lists from passive sources, and hosts whose responses to unknown paths differ from the main site.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What happened, in plain words

A security researcher named xgoon found a publicly accessible folder on a host under *.royalcanin.ca. This folder was called public_html, which is a common name for the place where a website's files live on a server. Inside it were files that WordPress, a popular system for building websites, uses to run the site. These files included database credentials, authentication keys and API secrets. All of this could be downloaded as a zip file, which is a single file that bundles other files together, like a folder you can email.

The report does not say the exact web address that was used, the name of the zip file, or show any of the requests and responses. So we only know the general story: the folder was open to the public, a zip file inside it could be downloaded, and that zip contained the WordPress configuration material.

The security team validated the report, coordinated with the remediation team, and confirmed by retesting that it was resolved. The issue was rated medium severity with a CVSS score of 5.7 (CVSS is a standard way to score how serious a vulnerability is). No bounty amount is mentioned.

Why this matters

When a website's configuration files are exposed, several bad things can happen. The database credentials could potentially allow an attacker to read or change the site's data. The authentication keys were among the exposed secrets. And if source code (the programming instructions that make the site work) is exposed, attackers can look for other weaknesses. The report says these risks were "potential" and does not claim anyone actually did any of this.

In general, how this kind of bug works

Web servers are like a filing cabinet: when you type a web address, the server looks up the matching file and sends it back. Normally, a file like wp-config.php is protected because the server runs it as a program instead of showing its contents. But if a copy of that file is saved in a form the server treats as a plain file, such as a .zip, .tar.gz, .bak, or .txt file, then the server will happily hand it over to anyone who asks. This often happens when someone makes a backup or moves a site and leaves the old files lying around in a folder that is accessible from the web.

Another common problem is directory listing: if a folder has no index page, the server may show a list of all files inside it, like opening a drawer and seeing everything.

How to test for it (general guidance)

If you are testing your own site or one you have permission to test, here is a safe way to look for this issue:

  1. Think about where backups or old files might be. Common folder names include /backup, /backups, /old, /tmp, /dev, /staging, /public_html, /www, and files with dates like backup-2024.zip.
  2. Visit the folder itself (without a specific file name) in your browser. If you see a list of files instead of an error page, directory listing is turned on.
  3. If you see a list, click on any zip or configuration-looking file. If there is no list, try guessing common backup names based on the site's name.
  4. A real finding is when you get a file that actually downloads and contains configuration data, not just an error page that happens to load. Check the file type and open it carefully.
  5. Be careful: some sites show a friendly error page that looks like a normal page, or an empty list. Always confirm the file is real before reporting.

How it is fixed

The fix is to turn off directory listing on the server, move backups and old files out of the web-accessible folder, and block access to sensitive file types. Also, because secrets were exposed, the site owner should change the database password and generate new WordPress secret keys, then check logs for any unauthorised access.

Glossary

  • WordPress: A free system for building and managing websites; it stores its settings in a file called wp-config.php.
  • Configuration file: A file that holds settings for a program, often including passwords and other secrets.
  • Database: An organised collection of data that a website uses, such as user accounts and content.
  • Credentials: A username and password pair used to access a system.
  • API secret: A password-like string that lets one program talk to another service securely.
  • Zip file: A single file that contains multiple files compressed together, like a digital envelope.
  • public_html: A common folder name on web servers where website files are stored and served to visitors.
  • Directory listing: When a web server shows a list of all files in a folder instead of a normal web page.
  • CVSS: A standard scoring system (0 to 10) that rates the severity of a security vulnerability.
  • Cookie: A small piece of data stored by your browser that helps a website remember who you are.
  • Authentication keys: Secret codes used by WordPress to secure login cookies and other tokens.
  • Source code: The human-readable instructions that make up a program.
  • Information disclosure: A vulnerability where sensitive information is exposed to people who should not see it.
  • Document root: The folder on a web server that corresponds to the main web address; anything inside it can be accessed via a URL.

More by xgoon

View all

2 more disclosed reports, best first.

More from Mars

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.