Information Disclosure via Publicly Accessible Debug Log
A WordPress debug.log file was publicly accessible, exposing PHP warnings that revealed server file paths and plugin details. An attacker could use this information to fingerprint the environment and potentially exploit known plugin vulnerabilities.
- Triaged in under an hour
- Fixed in 32 days
- Disclosed after 5 months
Summary
A publicly accessible WordPress debug.log file via █████████ was discovered on the target system. The file contains PHP warnings and deprecated notices that disclose sensitive server paths and plugin details. This exposure may assist an attacker in fingerprinting the environment, exploiting known vulnerabilities in specific plugins, or using path disclosure for further attacks such as Local File Inclusion (LFI) or Remote File Inclusion (RFI).
Impact
Impact
- Sensitive Path Disclosure: Reveals full server-side file system path
/home/site/wwwroot/. - Plugin Identification: Exposes
wp-optimizeplugin location and code usage, enabling attackers to check for known CVEs or vulnerabilities. - Error Handling Insights: Shows how the system processes unexpected input, which may aid attackers in bypassing validation or exploiting improper input handling.
- Future Risk: If the log continues to grow, it may record sensitive data such as tokens, API keys, SQL queries, or user credentials.
Overall, this issue significantly increases the attack surface by leaking detailed environment information to unauthenticated users.
System Host(s)
███████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Proof of Concept (PoC)
-
Navigate to the following URL in a browser:
████████ -
The log file is directly installed and returns sensitive server-side information. Example snippet:
[18-Jun-2025 15:19:46 UTC] PHP Warning: Undefined array key "host" in /home/site/wwwroot/wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php on line 251 [18-Jun-2025 15:19:46 UTC] PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /home/site/wwwroot/wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php on line 251
Suggested Mitigation/Remediation Actions
Recommendation
-
Disable Public Access
- Restrict direct access to
*.logfiles using.htaccessor web server rules. - Example (Apache):
APACHE <FilesMatch "\.log$"> Require all denied </FilesMatch>
- Restrict direct access to
-
Disable Debugging in Production
- Ensure that
WP_DEBUGandWP_DEBUG_LOGare disabled inwp-config.php:PHP define('WP_DEBUG', false); define('WP_DEBUG_LOG', false);
- Ensure that
-
Update Plugins
- Update
wp-optimizeto the latest version to patch any related vulnerabilities and deprecated function calls.
- Update
-
Log Management
- Regularly review logs for sensitive information and clear unnecessary entries.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the debug log file was left in a publicly accessible directory without access restrictions, and debugging was enabled in production.
Impact
The exposure could help an attacker fingerprint the environment, identify vulnerable plugins, and use path disclosure for further attacks such as Local File Inclusion or Remote File Inclusion.
What the attacker needed
None
The fix
The log file should be made inaccessible via web server rules, debugging should be disabled in production, plugins should be updated, and logs should be regularly reviewed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A debug log is a file where a website writes error messages to help developers fix problems. If that file is left publicly accessible, anyone can read it and learn about the server's setup, such as where files are stored and which plugins are installed. This information can help an attacker plan further attacks.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.