Server Side Request Forgery (SSRF)
Introduction
This article covers cases of possible SSRF on WordPress. This includes improper URL fetch handling inside of the plugin/theme which can be used to perform unauthorized actions or access to data within the organization. This can be in the vulnerable application, or on other back-end systems that the application can communicate with.
Useful Functions
Several functions could be useful to identify a possible SSRF vulnerability:
-
PHP related
-
WordPress related
Example Cases
Below is an example of vulnerable code:
To exploit this, any unauthenticated user just needs to perform a POST request to the /wp-admin/admin-ajax.php
endpoint specifying the needed parameter to trigger the wp_remote_get
function.
Below are some of the findings related to SSRF: