goiblas / Map-Block-Leaflet

Map Block Leaflet for WordPress 🗺️
https://wordpress.org/plugins/map-block-leaflet
GNU General Public License v2.0
17 stars 10 forks source link

Content of tooltip is not properly escaped. #22

Closed daviewales closed 5 years ago

daviewales commented 5 years ago

The contents of the tooltip are inserted directly into the page without proper escaping. This means that including quotation marks breaks the loading and rendering of the map. Additionally, inserting a newline also breaks rendering.

It also means that by setting the value of the tooltip as follows, arbitrary javascript can be inserted into the page:

');alert('hi');console.log('unescaped arbitrary code execution!

(You should see an alert, and an entry in the console.)

goiblas commented 5 years ago

Thx