Skip to content
Account takeover Write-up Intermediate

How a Routine Security Review Turned Into a Full Supply Chain Risk Discovery

The site loaded third-party scripts without Subresource Integrity or a Content Security Policy, and its session cookies were readable by JavaScript and were the sole means of authenticating API requests. An attacker who controlled or compromised a third-party script could therefore read the cookies and use them to access user-specific API data, forming an account takeover path.

mothersamantha Follow

Published on medium.com

I spend a lot of time looking at how real applications behave in the browser. Recently, during a routine review of a retail platform, I ran into a pattern that reminded me why supply chain security is never a theoretical topic.

Samantha Mills, on medium.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 site trusted third-party scripts without integrity or origin restrictions while also making session cookies readable to JavaScript and relying on those cookies alone for API authentication.

Impact

An attacker who controls or compromises a third-party script could read the session cookies and use them to access user-specific API data, resulting in account takeover without user interaction.

What the attacker needed

Third-party script on authenticated pages; attacker controls or compromises that script; cookies readable by JavaScript; cookies alone authenticate the API

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.

Websites often load code from other companies, such as analytics or advertising scripts. If those scripts are not locked down, and if the site's login cookies can be read by any script on the page, then whoever controls that outside code can steal the login and act as the user. This report describes exactly that combination.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.