That's certainly something to be considered with user uploaded svg images. However it's reasonably straightforward to parse an svg and remove any script elements.
Re:Web Graphics Done Right
by microcolonel on Monday October 07, 2019 @04:52PM
(#21185827)
You can safely use XSLT to subset SVG, and (for example) limit complexity. Scripts in SVGs do not load in img tags either.
But SVG can embed javascript which can lead to XSS: https://hackerone.com/reports/148853