Geofield Map
The module does not properly clean up some data before displaying it. An ordinary account on the site could add malicious scripts that run in the browser of anyone who opens a map marker. This could allow them to view hidden data or change information on the site.
- Who could do thisOnly someone with a login on your site.
- Does it apply to youAny site using this module.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate Geofield Map to 11.1.10.
For developers: what the fix changed
The fix sanitises infowindow content by escaping raw values and processing formatted text fields using a new `sanitizeInfowindowValue` method in `GeofieldMapFieldTrait`, which is applied in `GeofieldGoogleMapFormatter` and `GeofieldGoogleMapViewStyle`. It also adds `Drupal.checkPlain` in `js/geofield_map.geocoder.js` and uses `DOMParser` in `js/geofield_map_gmap_formatter.js` to prevent XSS.
Also in this release Fixed concurrent marker directory creation warnings, resolved PHPStan and phpcs errors, and updated the Views style schema.
composer.json+6 −0config/schema/geofield_map.style.schema.yml+88 −5geofield_map.module+0 −1js/geofield_map.geocoder.js+1 −1 fixjs/geofield_map_gmap_formatter.js+4 −2 fixphpstan-baseline.neon+0 −18src/Form/GeofieldMapSettingsForm.php+4 −4src/GeofieldMapFieldTrait.php+53 −0 fixsrc/Plugin/Field/FieldFormatter/GeofieldGoogleMapFormatter.php+22 −6 fixsrc/Plugin/Field/FieldWidget/GeofieldMapWidget.php+6 −10src/Plugin/views/style/GeofieldGoogleMapViewStyle.php+11 −2 fixsrc/Services/GoogleMapsService.php+5 −5