Rendered at 14:36:18 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
Scryptonite 14 hours ago [-]
Deja Vu. I had to submit an issue and fix a similar issue years ago -- it was similarly Twitch chat overlay XSS, but for that they (the streamer) at least tried to strip the tags (but it was a poor JS implementation of PHP strip_tags), and the streamer didn't understand the issue until I crafted a image with onload/onerror to freeze/hang the chat overlay.
doodlesdev 14 hours ago [-]
Fucking absurd. I'll forever hate developers who allow for such _bizarre_ exploit chains to happen. OBS is an OSS project which I believe has received a lot of love throught the years, but having the Chromium sandbox disabled due to authentication with _certain services_ not working with it enabled is asinine. Don't even want to imagine the other problems the project might have waiting to be exploited.
Sure, if the plugin developer sanitized the comments before inserting them, this wouldn't have happened _this way_, but having a browser engine two years outdated (for a reason which IMO is absolutely reasonable compared to other situations before) and having the Chromium sandbox completely disabled with nothing to substitute it is crazy in a software onto which people insert random plugins from the internet to get random functionality.
Hopefully those two changes ship fast to OBS. I may be supporting the project financially in the future if they update their security posture, as I'm generally very fond of OBS.
WesSouza 4 hours ago [-]
“a Twitch chat overlay that rendered viewer messages as raw HTML”
Well damn.
soulofmischief 7 hours ago [-]
This would be an interesting writeup if it wasn't so unfocused due to being written or heavily edited by an LLM.
tolien 3 hours ago [-]
Another echo of XKCD 2347 [0], except this time it's pretty much the entire live streaming ecosystem depending on a bunch of volunteers.
Not even counting the time it took to make this PR, releasing a security update for the browser took 4 months to merge. For reference Brave has a 1 day SLA for releasing the update itself after a security fix gets published.
landr0id 10 hours ago [-]
It's not just moving a code pointer. They had to migrate CEF runtimes (Alloy to Chrome) which, as I understand from the few minutes of reading I did to understand the complexities outlined in the PR, was necessary because Alloy was removed in M128. So OBS was using the last version of legacy runtime and needed to migrate. I imagine they wanted to do a decent amount of testing to ensure compat.
charcircuit 8 hours ago [-]
>It's not just moving a code pointer.
That's not the end user's problem. End user's don't want to be told that they got hacked because keeping your product secure was too hard.
superkuh 14 hours ago [-]
This shouldn't be a problem right? Javascript is by default allowed to execute on your PC in every modern browser. The days where people did not blindly execute arbitrary code from unknown and random sources are far in the past. Now if you don't do that you are considered weird and no websites actually display anything when you attempt to view them.
This is not a bug. This is the the entire design architecture's intent for modern JS application execution based "web". If this was the correct choice for the web then this should not be a problem at all. But we all know it is. The architecture choice forces this. Until we stop arbitrarily executing random third party code this will always happen. And the consequences will get worse and worse as more bare metal features are exposed in to browsers JS virtual machines.
Be the change in the world you want to see. Turn javascript off. Use real native applications that cannot change underneath you.
II2II 10 hours ago [-]
> Be the change in the world you want to see. Turn javascript off. Use real native applications that cannot change underneath you.
I'm not terribly familiar with this sort of software, but isn't the reason for embedding Chromium to have access to JavaScript. Sure, it was intended for the person running the OBS instance. Yet offering the end user that much power also opens up the possibility of them shooting themselves in the foot.
winstonwinston 12 hours ago [-]
> Be the change in the world you want to see. Turn javascript off. Use real native applications that cannot change underneath you.
But they can change (underneath). Native app is one bug away from arbitrary code execution. When remote content triggers this bug, it becomes RCE. In this case it was javascript engine bug, in any other it could be your photo viewer or whatever native code you are running with untrusted content. The untrusted content being an image you are viewing.
doodlesdev 13 hours ago [-]
Craziest thing is the mixture of:
- A browser engine outdated by two years, with known-exploited CVEs
- Chromium sandboxing completely disabled [0]
- JavaScript V8 Engine with JIT enabled [0]
For me, it's surprising we haven't seen more of these yet.
... and trying hard to parse any stream of bits thrown at it. That's why iMessage and Whatsapp zero click ecploits work so well.
UqWBcuFx6NV4r 14 hours ago [-]
In a word, no.
If you’re all “ra ra ra JavaScript!” you’re going to be shocked to find out what evil one can accomplish (either now or at various points in the past due to since-patched browser exploits or web platform security oversights) with just HTTP, HTML and CSS.
Not only is your pipe dream a pipe dream, and a misinformed one at that, it won’t even come close to completely protecting you. Terms like “code” and “execute” are largely arbitrary. If you want safety, stop letting untrusted payloads enter your machine at all, and that includes Hacker News.
doodlesdev 13 hours ago [-]
> If you’re all “ra ra ra JavaScript!” you’re going to be shocked to find out what evil one can accomplish (either now or at various points in the past due to since-patched browser exploits or web platform security oversights) with just HTTP, HTML and CSS.
There's such a thing as an attack surface. JavaScript with JIT enabled has an attack surface so much larger than HTML and CSS that I cannot believe you're saying this in good faith.
userbinator 13 hours ago [-]
Look at how many browser exploits need JS, and how many don't. The latter tend to be far more memorable too, specifically for that reason.
JS is a huge attack surface. It's better if it isn't used where it isn't actually needed.
pie_flavor 11 hours ago [-]
OBS explicitly disabled the security feature that would have prevented this attack in a real browser.
landr0id 10 hours ago [-]
While problematic, this is pointing the finger at the wrong thing. The version of the browser was from 2024. The permutations of full chain exploits permitting sandbox escape since then is probably pretty high.
It's a patch gap, plain and simple. Removing the sandbox certainly did not help things.
simoncion 11 hours ago [-]
...and people keep telling me that using a sprawling system that -by design- ingests attacker-supplied executable code and executes it is a much more sane way to build GUIs than to use a system that -well- isn't and doesn't... [0]
[0] If you're thinking about retorting with something like "Noone will download native programs, that's why 'everything' is in a web browser!", remember that this is code execution triggered in OBS Studio. [1]
The interesting part IMO is less the XSS on the streamer's overlay, but the fact that it could escape the browser source web page into local code execution (via a combination of OBS disabling the chromium sandbox, and using an outdated CEF version)
Toprogos 11 hours ago [-]
[flagged]
Ozzie-D 13 hours ago [-]
[flagged]
hahn-kev 11 hours ago [-]
It seems wild to me that Twitch doesn't sanitize the messages on their backend. I'm sure that they sanitize them on their own UI. But considering how many people also consume messages via their API, they should also sanitize for them, defense in depth and all.
calmingsolitude 10 hours ago [-]
This makes absolutely no sense. The API returns the exact content of the message, and has no idea where it possibly might be displayed. It could be another browser, so html tags will need to be sanitized, but it might as well be the terminal, so ansi escape codes will need to be sanitized instead.
rubendev 8 hours ago [-]
Yes, you need to apply output encoding or sanitization at the place where it is being combined with another string. Otherwise you don’t know the encoding which is needed. Even for HTML you cannot do it on the backend, because you don’t know if it will be injected into HTML PCDATA context (tags) or in HTML attribute context.
Ohentis 10 hours ago [-]
I feel like trying to predict every way someone could fuck up a chat display is a fool's errand.
Rohansi 11 hours ago [-]
How can you sanitize it in the backend? Do you just not allow sending messages with HTML tags in them?
btilly 11 hours ago [-]
No. You have rules for explicitly allowed HTML, and escape anything that could be a tag that does not follow the rules.
This allows people to paste in rich content, but not things like <script> tags.
hahn-kev 11 hours ago [-]
That, or no script tags, but that is quite hard as I understand.
Sure, if the plugin developer sanitized the comments before inserting them, this wouldn't have happened _this way_, but having a browser engine two years outdated (for a reason which IMO is absolutely reasonable compared to other situations before) and having the Chromium sandbox completely disabled with nothing to substitute it is crazy in a software onto which people insert random plugins from the internet to get random functionality.
Hopefully those two changes ship fast to OBS. I may be supporting the project financially in the future if they update their security posture, as I'm generally very fond of OBS.
Well damn.
0: https://xkcd.com/2347/
Not even counting the time it took to make this PR, releasing a security update for the browser took 4 months to merge. For reference Brave has a 1 day SLA for releasing the update itself after a security fix gets published.
That's not the end user's problem. End user's don't want to be told that they got hacked because keeping your product secure was too hard.
This is not a bug. This is the the entire design architecture's intent for modern JS application execution based "web". If this was the correct choice for the web then this should not be a problem at all. But we all know it is. The architecture choice forces this. Until we stop arbitrarily executing random third party code this will always happen. And the consequences will get worse and worse as more bare metal features are exposed in to browsers JS virtual machines.
Be the change in the world you want to see. Turn javascript off. Use real native applications that cannot change underneath you.
I'm not terribly familiar with this sort of software, but isn't the reason for embedding Chromium to have access to JavaScript. Sure, it was intended for the person running the OBS instance. Yet offering the end user that much power also opens up the possibility of them shooting themselves in the foot.
But they can change (underneath). Native app is one bug away from arbitrary code execution. When remote content triggers this bug, it becomes RCE. In this case it was javascript engine bug, in any other it could be your photo viewer or whatever native code you are running with untrusted content. The untrusted content being an image you are viewing.
- A browser engine outdated by two years, with known-exploited CVEs
- Chromium sandboxing completely disabled [0]
- JavaScript V8 Engine with JIT enabled [0]
For me, it's surprising we haven't seen more of these yet.
[0]: https://github.com/obsproject/obs-browser/blob/f555da02b1d59...
JS is a huge attack surface. It's better if it isn't used where it isn't actually needed.
It's a patch gap, plain and simple. Removing the sandbox certainly did not help things.
[0] If you're thinking about retorting with something like "Noone will download native programs, that's why 'everything' is in a web browser!", remember that this is code execution triggered in OBS Studio. [1]
[1] <https://obsproject.com>
This allows people to paste in rich content, but not things like <script> tags.