JavaScript in SVGs
devdailydigest.tech
JavaScript in SVGs
1–10 of 13 posts
Re: JavaScript in SVGs
#2Re: JavaScript in SVGs
#3Re: JavaScript in SVGs
#4Still though, I think this was a mistake to do.
Hopefully scripts are disabled when including svg via an img tag.
Re: JavaScript in SVGs
#5Yeah, but JS modules only on Firefox. :p Still though, I think this was a mistake to do. Hopefully scripts are disabled when including svg via an img tag.
In other words, if I can set an SVG file as the image of an img tag or as the URL in a background-image style property, then I ought to be able to use an HTML file, too— and JS should run in both or neither, with the same sandbox properties. Probably neither.
Likewise, if I can set an HTML file as the contents of an iframe, then I ought to be able to use an SVG file that way, too— and JS should run in both or neither, with the same sandbox properties. Probably both.
Re: JavaScript in SVGs
#6Re: JavaScript in SVGs
#7SVG images can contain JavaScript - https://news.ycombinator.com/item?id=39079943 - Jan 2024 (50 comments)
Re: JavaScript in SVGs
#8Re: JavaScript in SVGs
#9Re: JavaScript in SVGs
#10Sounds like an attack vector
They would draw a triangle and then hash the result to get a detailed bowser fingerprint of the victims machine.