Earlier quoted context omitted.
I don't think anybody in SFBA-style software development, both pre- and post-LLM, is really resilient against these kinds of attacks. The problem isn't vibe coding so much as it is multiparty DLL-hell dependency stacks, which is something I attribute more to Javascript culture than to any recent advance in technology.
I do occasionally wonder how different things would be if JavaScript had come with a very robust standard library from early on.
We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
371–380 of 453 posts
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#372Earlier quoted context omitted.
XSS is categorically not an RCE and my point is that mitigations exist which make "It allows you to run any action as if you were the owner of the account" an unwarranted assumption. The writeup shows that it's possible to pop an alert box. That doesn't tell you anything about what's actually possible. Obviously Discord got enough information to take it seriously, but extrapolating that to suggest every third-party u…
How is XSS not remote code execution? You can do anything, from send fetch requests to the server with full credentials to loggging keystrokes or even open a tunnel and eval payloads... Anything the user can do, you can do via an XSS attack.
RCE usually implies server-side code execution (or breaking out of browser sandbox).
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#373Earlier 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.
Token stealing hasn't been a real danger for a decade now. If you don't mark your token's as non-HTTP you're doing something explicitely wrong, because 99% of backends nowadays do this for you.
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#374Earlier 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.
if you set the cookier header right (definitely not always the case), this is true, but the javascript can still send requests that will have that cookie included, effectively still letting the hacker use the session as the logged in user
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#375Seems like such a tiny amount of money for a bug that can be used to completely own your customers accounts. Also not much excuse for xss these days.
This comes up on every story about bug bounties. There is in general no market at all for XSS vulnerabilities. That might be different for Twitter, Facebook, Instagram, and TikTok, because of the possibility of monetizing a single strike across a whole huge social network, and there's maybe a bank-shot argument for Discord, but you really have to do a lot of work to generate the monetization story for any of those. T…
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#376This 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…
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#377Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#378Earlier quoted context omitted.
> - Your Discord session cookies and token could be stolen, leading to a complete account takeover. Discord uses HttpOnly cookies (except for the cookie consent banner).
tokens are stored in localStorage, which is accessible by JS
So your code goes like:
// Try localStorage first
const token = getLocalStorageItem('token')
if (token) return token
// Try webpack if localStorage fails
const webpackToken = await getTokenFromWebpack()
if (webpackToken) return webpackToken
and localStorage does fail often now. I knew the reason for that (something about them removing it at some point when you load the website?) so you need the webpack way, which is consistently reliable.I believe if you search for the snippet above, you can find the code for the webpack way.
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#379Earlier quoted context omitted.
>the $4,000 bounty feels like a slap in the face. And serves a reminder crime does pay. In the black market, it would have been worth a bit more.
I was once only given $1,000 for an exploit where I could put in npm usernames and get their email addresses. Big corps don't always pay what they should.
Re: We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
#380It’s clear to me now that I need to set up my home machine the way I set up BYOD when I was contracting last. I need a separate account for all of my development. I have a friend who at one point had five monitors and 2 computers (actually it might be 3) on his desk and maybe he’s the one doing it right. He keeps his personal stuff and his programming/work stuff completely separate.