this post was submitted on 08 Sep 2025
89 points (98.9% liked)

Tech

2020 readers
126 users here now

A community for high quality news and discussion around technological advancements and changes

Things that fit:

Things that don't fit

Community Wiki

founded 2 years ago
MODERATORS
 

Scalable vector graphics (.svg) files are lightweight, XML-based images that render at any resolution. They’re usually harmless, but they can also contain active code, and hackers appear to be relying on them more often as a means to stealthily deliver malware.

top 16 comments
sorted by: hot top controversial new old
[–] panda_abyss@lemmy.ca 31 points 3 weeks ago (1 children)

I love svg but like all web standards they crammed too much shit into it.

[–] undefined@lemmy.hogru.ch 21 points 3 weeks ago (2 children)

Why would they support HTML and JavaScript? ffs

[–] ulterno@programming.dev 4 points 3 weeks ago (1 children)

Surely not all SVG viewer implementations would be supporting the JS, right?

[–] ISO@lemmy.zip 3 points 3 weeks ago (1 children)

resvg/usvg is a good implementation if you're looking for one.

[–] ulterno@programming.dev 1 points 3 weeks ago

Nice.
Perhaps would be useful for someone making a Lemmy Client.

My thoughts were more in the lines of:

  • Firefox probably supports the JS in SVG
  • I would expect Inkscape to not execute the JS, but let it be when edited and saved.
  • For normal viewers on the desktop, I'd expect JS to be fully ignored.
[–] unexposedhazard@discuss.tchncs.de 8 points 3 weeks ago* (last edited 3 weeks ago)

Eh okay this requires a lot of stupid things to be done by the user to deliver its payload. Sounded scarier from the title.

[–] TropicalDingdong@lemmy.world 4 points 3 weeks ago (1 children)

I forget. Are svg's turing complete?

[–] Sxan@piefed.zip -1 points 3 weeks ago

No, not in itself. But þe SVG spec allows for JavaScript, and þat's where þe issue is.

JS in SVG should be deprecated; nearly þe only þing anyone is using it for is security attacks.

[–] Marthirial@lemmy.world 2 points 3 weeks ago

How is this news? Even WordPress has blocked SVG uploads for years unless sanitized with a plugin.