Feedback & Ideas sedI · изменено

[RESOLVED] Icons need non-SVG fallbacks; SVG is disabled in Safest Mode in Tor Browser

"Safest" mode in Tor Browser disables SVGs, so icons (comment vote/reply, site theme select, message/notification, etc.) aren't visible to many users. They need a ​ fallback ​ replacement using text, glyphs (🖂 🕭 ⮝ ⮟ ⮪ etc.), or PNGs.

​ Affected users can set svg.disabled to false in about:config as a workaround. This will technically mean you are no longer in "Safest" mode. I don't know whether or not this presents any actual security risk. ​

This should not be done as it does present significant security risk in multiple ways, which I'll elaborate on at the bottom of this post.


tl;dr

The site should use a safer alternative (below) as a fallback (or even a replacement) for the SVG icons.

While Tor Browser defaults to the Standard security level, many users receive and take to heart the recommendation to change this to Safest.
SVG presents an attack surface that is complex and substantial enough to lead Tor Browser to have SVGs disabled in Safest mode.
UI elements necessary to navigating the site shouldn't depend on the user re-enabling features that diminish their security posture.
(And Tor devs have explicitly warned users that re-enabling SVG (specifically) contradicts the point of Safest mode and should not be done.)


Safer options

  • Plain text
    I think the people who would tend to find their way here are largely not allergic to processing some letters and words in order to find their way around a website.

  • Raster images
    Loading a bunch of individual PNGs over Tor to use them as icons would of course be less than ideal, but this becomes a non-issue if the icons are actually a single sprite sheet combined with background-position to select the icon from the sheet (and possibly also background-size if you want to scale down a higher-resolution version for more crisp).

  • Unicode characters (🖂 🕭 ⮝ ⮟ ⮪ etc.)
    The tradeoff is that they often won't quite align with the aesthetic you had in mind. Probably best combined with text labels; e.g., "⮪ Reply" instead of just "⮪". Some of them are now rendered as graphical emojis, and I'm not sure if there's a way to make them not do that.


SVG security issues

For one thing, regardless of the security of SVG per se, re-enabling it raises the issue of fingerprinting (e.g., it can be detected in various ways that a client won't run javascript but will render SVGs), which is the sort of thing it would behoove many of us to be paranoid about in any case.

As for actual SVG vulns, at first I thought it was mostly about things like exploiting javascript in the SVGs to do XSS or deliver base64-encoded malware or whatever, so I figured they wouldn't present a significant risk, provided that javascript remained disabled in the browser overall (as long as there weren't any vulnerabilities where the browser/engine could be made to run the javascript anyway).

This turned out not to be the case. I had, for one thing, been unaware of many kinds of problems that can come up within that scope alone. I did get affirmation that the browser (of course) isn't supposed to run javascript in an SVG if javascript is generally disabled, and that there have been bugs where it (Gecko, or Tor Browser, or whatever) ran the js anyway (in context of SVGs or not).

But there's entirely another domain of risk presented by SVGs that I had been totally oblivious to. As it turns out, the concern in mind with regard to Tor Browser is mainly that some features of SVG can involve mathematical/parsing/rendering/etc. operations of sufficient complexity to turn vulnerabilities in Gecko's SVG implementation (C++) into a variety of memory safety/integrity bugs. This would be the "real" point of disabling SVGs in Tor Browser -- its most at-risk users would tend to be targeted by entities with the motivation and resources to find or acquire such vulns.

While I do have professional experience in a technical role in the network/information security industry, I don't have in-depth or hands-on experience with the things I've mentioned here. I sought to understand them only to the extent necessary to get an idea of whether they're substantial issues and whether enabling SVGs anyway would be an acceptable risk. So this section is only meant to relay that same marginal, limited-scope understanding.

If you need more, I trust you won't have any trouble finding information about the range of security vulnerabilities that can be caused by SVGs per se and by the other things they can contain or link to, both generally and in Tor Browser, and about whether or not there can ever be any reasonably safe way to have SVGs enabled in Tor Browser.

↑ 4

Обсуждение

Комментарии

2

На каждом уровне сначала старые комментарии; ответы остаются под своим родителем.

Написать Join — чтобы участвовать в обсуждении.

Ответы · 1
@ThatGuy,

Yes, I saw earlier that you've implemented the PNG sprites. :D

It seems to be resolved. The icons are fine now in Safest mode. Thanks