You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that uBlock Origin applies translations by effectively assigning the translated string to element.innerHTML. This means that a translation like Fake translation<img src="dummy" onerror="alert(/xss/)"> will run JavaScript code in the context of your extension. I played with the thought of submitting an Easter egg via Crowdin translation in order to see when this would be caught but opted for responsible disclosure in the end.
For reference, Adblock Plus uses HTML tags in translations merely as placeholders, translations are always being applied via DOM methods that cannot have unexpected side-effects. It's probably best if you use something similar rather than verifying translations manually.
The text was updated successfully, but these errors were encountered:
I do check manually all translation changes, but I agree that not using innerHTML and supporting some sort of markdown mechanism to manually parse and only support the smallest necessary set of HTML tags is best (though I will still need to always review manually all changes).
Do you mind if I open an issue on uBO's issue tracker with the content of your message above and identifying you the person who reported the issue?
Ok, I will let you open the issue then. I don't see the public disclosure as being a problem since I do check manually with Meld all translations when I import them, even more carefully now with being aware of the issue.
I noticed that uBlock Origin applies translations by effectively assigning the translated string to
element.innerHTML
. This means that a translation likeFake translation<img src="dummy" onerror="alert(/xss/)">
will run JavaScript code in the context of your extension. I played with the thought of submitting an Easter egg via Crowdin translation in order to see when this would be caught but opted for responsible disclosure in the end.For reference, Adblock Plus uses HTML tags in translations merely as placeholders, translations are always being applied via DOM methods that cannot have unexpected side-effects. It's probably best if you use something similar rather than verifying translations manually.
The text was updated successfully, but these errors were encountered: