Hacking Netflix for $$$ — Stored XSS + IDOR to Session Hijacking & Account Takeover
A stored cross-site scripting (XSS) vulnerability in Netflix's Dispatch application allowed an attacker to inject malicious scripts into incident types, severities, and priorities, which would execute when other users viewed the dashboard. An IDOR vulnerability in the organization creation endpoint allowed an attacker to overwrite the default organization's name, enabling the attacker to create a new organization named 'default' and trigger the stored XSS without user interaction, leading to session hijacking and account takeover.
Published on blog.viktormares.com
Hi everyone, after quite a break from writing and focusing on the more technical parts of my job, I am back with an interesting vulnerability that me & my friend Lyubomir Tsirkov found in Netflix’s Dispatch application.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application failed to sanitize user-supplied data before rendering it in charts, and it missed an authorization check during organization creation that allowed overwriting an existing organization's details.
Impact
An attacker could hijack a user's session by stealing their JWT, leading to account takeover, and could also delete all other users and data within the Dispatch instance; however, Netflix noted that the lack of open registration reduced the overall risk.
What the attacker needed
A free account; ability to create an organization; victim logs in to the application
The fix
The vulnerabilities were fixed by using DOMPurify to sanitize chart data and by adding a check in create_organization() to return a 409 error if the organization ID already exists.
How it was found
- Register as a member and create a new organization to become its Owner.
- Create incidents and incident types with a payload that triggers XSS on the dashboard.
- Intercept the POST request to create a new organization and set the id parameter to an existing organization's id (e.g., 1 for the default organization) to overwrite its name.
- Create a new organization named 'default' to become its Owner.
- Create new incidents and incident types in the new 'default' organization to trigger the stored XSS when any user logs in.
- Steal the user's JWT from local storage and use it to create a new user with the attacker's email as Owner of the original 'default' organization.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This report describes two security flaws in a web application. The first is a stored cross-site scripting (XSS) bug, where an attacker can save malicious code (like a script) into the application, and it runs in other users' browsers when they view the affected page. The second is an insecure direct object reference (IDOR) bug, where the application lets an attacker change the identifier of an object (like an organization) to modify someone else's data. By combining them, the attacker could steal other users' login tokens and take over their accounts.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.