WordPress application vulnerable to DoS attack via wp-cron.php
The WordPress wp-cron.php script can be overwhelmed by a large number of requests, causing the server to consume excessive resources and become unresponsive. An attacker could send many requests to this endpoint, leading to a 502 error and potential downtime.
- Triaged in 17 hours
- Fixed in 11 days
- Disclosed after 46 days
Description: Hi team,
The WordPress application is vulnerable to a Denial of Service (DoS) attack via the wp-cron.php script. This script is used by WordPress to perform scheduled tasks, such as publishing scheduled posts, checking for updates, and running plugins.
An attacker can exploit this vulnerability by sending a large number of requests to the wp-cron.php script, causing it to consume excessive resources and overload the server. This can lead to the application becoming unresponsive or crashing, potentially causing data loss and downtime.
I found this vulnerability at https://████████ endpoint.
References
https://developer.wordpress.org/plugins/cron/
Impact
A successful attack on this vulnerability can result in the following consequences:
- Denial of Service (DoS) attacks, rendering the application unavailable.
- Server overload and increased resource usage, leading to slow response times or application crashes.
- Potential data loss and downtime.
System Host(s)
██████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
- Get the doser.py script at https://github.com/Quitten/doser.py
- Use this command to run the script:
python3 doser.py -t 999 -g 'https://█████/wp-cron.php'
- Go to https://████ after 1000 requests of the doser.py script.
- The site returns code 502.
- See the video PoC.
Suggested Mitigation/Remediation Actions
To mitigate this vulnerability, it is recommended to disable the default WordPress wp-cron.php script and set up a server-side cron job instead. Here are the steps to disable the default wp-cron.php script and set up a server-side cron job:
- Access your website's root directory via FTP or cPanel File Manager.
- Locate the wp-config.php file and open it for editing.
- Add the following line of code to the file, just before the line that says "That's all, stop editing! Happy publishing.":
define('DISABLE_WP_CRON', true);
- Save the changes to the wp-config.php file.
- Set up a server-side cron job to run the wp-cron.php script at the desired interval. This can be done using the server's control panel or by editing the server's crontab file.
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
Impact
A successful attack could render the application unavailable, cause server overload, slow response times, crashes, and potential data loss and downtime.
What the attacker needed
Network access to the target; Ability to send many requests
The fix
The default wp-cron.php should be disabled by setting DISABLE_WP_CRON to true in wp-config.php and replaced with a server-side cron job.
How it was found
- Obtain the doser.py script from the provided GitHub link.
- Run the script with a high thread count targeting the wp-cron.php URL.
- After 1000 requests, visit the site.
- The site returns HTTP status code 502.
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.
WordPress uses a file called wp-cron.php to run scheduled tasks like publishing posts. If someone sends thousands of requests to that file very quickly, the server can get overloaded and stop responding, like too many people calling the same phone number at once. This report shows that happening, causing the site to return an error.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.