Skip to content
Access control Write-up Beginner

Bypassing Hotstar Premium with DOM manipulation and some JavaScript

Hotstar enforced premium-content access only in client-side ReactJS logic, so the video player was loaded for every premium item and merely covered by a JavaScript-generated overlay. By deleting the overlay and unhiding the player element, an attacker could watch paid content for free.

OpSecX Follow

Published on opsecx.com

Hotstar is a premium streaming platform like Netflix and Amazon Prime Videos. The security controls for restricting premium content were implemented at client side as frontend React JS logic.

OpSecX (@OpSecX), on opsecx.com

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 access check for premium content was performed only in frontend JavaScript rather than on the server, so the player and stream were delivered to every visitor.

Impact

An anonymous user could view paid premium content without a subscription, though the workaround relied on repeatedly clicking play to counter the pause logic.

What the attacker needed

No account needed; browser developer tools

The fix

The issue was fixed, though the text does not describe how.

How it was found

  1. Open a premium video as an anonymous user and observe the overlay added by JavaScript.
  2. Delete the overlay element from the DOM.
  3. Change the player div's class from hidden to shown so the controls appear.
  4. Run a script that repeatedly clicks the play button to stop the video pausing.

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.

The website decided who could watch paid videos using code running in the visitor's own browser. Because that code can be changed by anyone, a user could remove the cover screen and reveal the video player that was already loaded underneath. The server should have checked permission before sending the video at all.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.